84 for (
int i = 0; i <
m_fields.size(); ++i)
91 for (
int j = 0; j < nq; ++j)
93 m_fields[i]->UpdatePhys()[j] = sin(x[j]) * sin(y[j]);
118 return eqSys->UpdateFields();
123 eqSys->PrintSummary(std::cout);
129 return eqSys->GetFunction(name);
136 return eqSys->GetFunction(name, field);
141 eqSys->WriteFld(name);
146 eqSys->Checkpoint_Output(n);
157 py::classh<EquationSystem, EqSysWrap>(m,
"EquationSystem")
162 .def(
"InitObject", &EqSysPub::v_InitObject)
163 .def(
"DoInitialise", &EqSysPub::v_DoInitialise)
164 .def(
"DoSolve", &EqSysPub::v_DoSolve)
165 .def(
"SetInitialConditions", &EqSysPub::v_SetInitialConditions)
166 .def(
"EvaluateExactSolution", &EqSysWrap::EvaluateExactSolution)
167 .def(
"LinfError", &EqSysWrap::LinfError)
168 .def(
"L2Error", &EqSysWrap::L2Error)
212 .def_static(
"Register", [](std::string &filterName, py::object &obj) {
213 fac(filterName, obj, filterName);
void EquationSystem_Checkpoint_Output(EquationSystemSharedPtr eqSys, int n)
std::shared_ptr< SessionFunction > EquationSystem_GetFunction1(EquationSystemSharedPtr eqSys, std::string name)
void EquationSystem_WriteFld(EquationSystemSharedPtr eqSys, std::string name)
EquationSystemSharedPtr EquationSystem_Create(std::string eqnSysName, LibUtilities::SessionReaderSharedPtr session, SpatialDomains::MeshGraphSharedPtr mesh)
Array< OneD, MultiRegions::ExpListSharedPtr > EquationSystem_GetFields(EquationSystemSharedPtr eqSys)
void EquationSystem_PrintSummary(EquationSystemSharedPtr eqSys)
void export_EquationSystem(py::module &m)
std::shared_ptr< SessionFunction > EquationSystem_GetFunction2(EquationSystemSharedPtr eqSys, std::string name, MultiRegions::ExpListSharedPtr field)
Dummy equation system that can be used for Python testing.
void v_InitObject(bool DeclareField) override
Initialisation object for EquationSystem.
DummyEquationSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
static std::string className
Name of class.
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
~DummyEquationSystem() override
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
A base class for describing how to solve specific equations.
SOLVER_UTILS_EXPORT void SetInitialStep(const int step)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNpoints()
SOLVER_UTILS_EXPORT int GetSteps()
virtual SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareFeld=true)
Initialisation object for EquationSystem.
SOLVER_UTILS_EXPORT NekDouble GetTimeStep()
SOLVER_UTILS_EXPORT void SetSteps(const int steps)
SOLVER_UTILS_EXPORT NekDouble GetTime()
Return final time.
SOLVER_UTILS_EXPORT void ZeroPhysFields()
SOLVER_UTILS_EXPORT void SetTimeStep(const NekDouble timestep)
SOLVER_UTILS_EXPORT void SetTime(const NekDouble time)
SOLVER_UTILS_EXPORT int GetNvariables()
SOLVER_UTILS_EXPORT const std::string GetVariable(unsigned int i)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
EquationSystemFactory & GetEquationSystemFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
EquationSystem wrapper to handle virtual function calls in EquationSystem and its subclasses.