49#pragma GCC visibility push(hidden)
58 std::shared_ptr<EquationSystem> eqn)
75 PYBIND11_OVERRIDE_PURE_NAME(
void,
Filter,
"Update",
v_Update, pFields,
89 PYBIND11_OVERRIDE_PURE_NAME(
bool,
Filter,
"IsTimeDependent",
93#pragma GCC visibility pop
97 using Filter::v_Finalise;
98 using Filter::v_Initialise;
99 using Filter::v_IsTimeDependent;
100 using Filter::v_Update;
110 if (py::len(args) != 3)
112 throw NekError(
"Filter.Create() requires three arguments: "
113 "filter name, a SessionReader object and an "
114 "EquationSystem object.");
117 std::string filterName = py::cast<std::string>(args[0]);
124 session = py::cast<LibUtilities::SessionReaderSharedPtr>(args[1]);
128 throw NekError(
"Second argument to Create() should be a SessionReader "
134 eqsys = py::cast<EquationSystemSharedPtr>(args[2]);
138 throw NekError(
"Second argument to Create() should be a EquationSystem "
145 for (
auto &kwarg : kwargs)
147 std::string arg = py::cast<std::string>(kwarg.first);
148 std::string val = py::cast<std::string>(py::str(kwarg.second));
152 std::shared_ptr<Filter> filter =
167 py::classh<Filter, FilterWrap>(m,
"Filter")
179 .def_static(
"Register", [](std::string &filterName, py::object &obj) {
180 fac(filterName, obj, filterName);
Nektar::ErrorUtil::NekError NekError
void export_Filter(py::module &m)
FilterSharedPtr Filter_Create(py::args args, const py::kwargs &kwargs)
Lightweight wrapper for Filter factory creation function.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
virtual void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0
virtual bool v_IsTimeDependent()=0
std::map< std::string, std::string > ParamMap
virtual void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Filter > FilterSharedPtr
A shared pointer to a Driver object.
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
FilterFactory & GetFilterFactory()
Filter wrapper to handle virtual function calls in Filter and its subclasses.
FilterWrap(LibUtilities::SessionReaderSharedPtr session, std::shared_ptr< EquationSystem > eqn)
Constructor, which is identical to Filter.
void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
bool v_IsTimeDependent() override