38#include <SolverCore/Core/SessionFunction.h>
39#include <SolverCore/GlobalLinSysOps/LinearSolvers/LinearSolverOp.hpp>
40#include <SolverCore/GlobalLinSysOps/LinearSystems/HelmSolve/HelmSolveOp.hpp>
41#include <SolverCore/GlobalLinSysOps/LinearSystems/LinearADRSolve/LinearADRSolveOp.hpp>
42#include <SolverCore/GlobalLinSysOps/LinearSystems/LinearSystemOp.hpp>
43#include <SolverCore/GlobalLinSysOps/LinearSystems/PoissonSolve/PoissonSolveOp.hpp>
44#include <SolverCore/PreconOps/PreconOp.hpp>
48using namespace MultiRegions;
65 "The SteadyADR is only implemented for "
66 "projectionType Galerkin");
100 for (
unsigned int i = 0; i <
m_forcing.size(); ++i)
122 std::stringstream ss;
126| \| | ___| | _| |_ __ _ _ __ _| |_ _| |_
127| . ` |/ _ \ |/ / __/ _` | '__|_ _|_ _|
128| |\ | __/ <| || (_| | | |_| |_|
129\_| \_/\___|_|\_\\__\__,_|_|
132 _ __ ___ __| | ___ ___ _ __ _ _ __ ___ __| |
133| '__/ _ \/ _` |/ _ \/ __| |/ _` | '_ \ / _ \/ _` |
134| | | __/ (_| | __/\__ \ | (_| | | | | __/ (_| |
135|_| \___|\__,_|\___||___/_|\__, |_| |_|\___|\__,_|
148 const auto nDiffCoeff = m_coordim * (m_coordim + 1) / 2;
156 else if (m_coordim == 2)
162 else if (m_coordim == 3)
181 EquationSystem::v_InitialiseFields();
184 m_expansionLists[0]);
186 "m_fce", bAtr_phys, m_variables[0],
m_npointsZ);
194 if (
m_session->GetSolverInfo(
"EQTYPE") ==
"SteadyADR")
197 if (
m_session->DefinesFunction(
"AdvectionVelocity"))
201 m_expansionLists[0]);
206 std::vector<std::string> vel = {
"Vx",
"Vy",
"Vz"};
207 vel.resize(m_coordim);
208 SessionFunction advectionVelocity(
m_session, m_expansionLists[0],
209 vel,
"AdvectionVelocity");
215 "not defined in session file.")
247 if (
m_session->DefinesFunction(
"DiffusionCoefficient"))
249 std::vector<std::string> names = {
"D00",
"D01",
"D11",
250 "D02",
"D12",
"D22"};
251 names.resize(m_coordim * (m_coordim + 1) / 2);
254 m_expansionLists[0]);
256 "DiffusionCoefficient", bAtr_phys, names.size(),
m_npointsZ);
258 m_session, m_expansionLists[0], names,
"DiffusionCoefficient");
269 else if (m_coordim == 2)
276 else if (m_coordim == 3)
298 m_preconOp = PreconOp<double>::Create(m_expansionLists[0],
301 m_expansionLists[0],
m_session->GetVariables());
303 if (
m_session->GetSolverInfo(
"EQTYPE") ==
"SteadyADR")
305 auto linearADRSolveOp = LinearADRSolveOp<double>::Create(
306 m_expansionLists[0],
m_session->GetVariables());
308 linearADRSolveOp->SetLambda(
m_lambda);
319 linearADRSolveOp->UpdatePrecon();
322 else if (
m_session->GetSolverInfo(
"EQTYPE") ==
"Helmholtz")
324 auto helmSolveOp = HelmSolveOp<double>::Create(
325 m_expansionLists[0],
m_session->GetVariables());
337 helmSolveOp->UpdatePrecon();
340 else if (
m_session->GetSolverInfo(
"EQTYPE") ==
"Poisson")
342 auto poissonSolveOp = PoissonSolveOp<double>::Create(
343 m_expansionLists[0],
m_session->GetVariables());
354 poissonSolveOp->UpdatePrecon();
Public interface of the backward-transform (BwdTrans) element operator, which maps a field from coeff...
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
A Field represents expansion data to be operated on.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static std::shared_ptr< BwdTransOp< TData > > Create(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="", const std::string &implStr="")
Create a backward-transform operator through the operator and block-operator factories.
A base class for describing how to solve specific equations.
NekDouble m_time
Current time of simulation.
int m_npointsZ
number of points in Z direction (if homogeneous)
virtual SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareFeld=true)
Initialisation object for EquationSystem.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &l)
Virtual function for generating summary information.
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > Load(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
std::shared_ptr< LinearSolverOp< double > > m_linearSolverOp
std::vector< ForcingSharedPtr > m_forcing
static std::string className1
Name of class.
static std::string className3
LibUtilities::Field< double, FieldState::Phys > m_varDiffCoeff
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
void v_InitialiseOperators() override
void SetDiffusionCoeff()
Set the diffusion Coeff. the diff. coeff., diffCoeff_{ij} := \epslion * D_{ij} where,...
void v_GenerateSummary(SummaryList &s) override
Virtual function for generating summary information.
static std::string className2
SteadyADR(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
SessionFunctionSharedPtr m_varDiffCoeffFunction
std::vector< double > m_diffCoeff
void LoadSessionParameters()
std::shared_ptr< BwdTransOp< double > > m_bwdTransOp
void v_InitObject(bool declareExpansionLists=true) override
Initialisation object for the SteadyADR problem.
LibUtilities::Field< double, FieldState::Phys > m_advectionVel
std::shared_ptr< PreconOp< double > > m_preconOp
LibUtilities::Field< double, FieldState::Phys > m_fce
std::shared_ptr< LinearSystemOp< double > > m_linearSystemOp
void v_InitialiseFields() override
void v_DoSolve() override
Solves SteadyADR problem.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
template std::vector< BlockAttributes< FieldState::Phys > > GetBlockAttributes< double, FieldState::Phys >(const MultiRegions::ExpListSharedPtr explist, const std::vector< unsigned int > &interleave_widths)
std::vector< std::pair< std::string, std::string > > SummaryList
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr