Nektar++
Public Member Functions | List of all members
FilterWrap Struct Reference

Filter wrapper to handle virtual function calls in Filter and its subclasses. More...

Inheritance diagram for FilterWrap:
[legend]

Public Member Functions

 FilterWrap (LibUtilities::SessionReaderSharedPtr session, std::shared_ptr< EquationSystem > eqn)
 Constructor, which is identical to Filter. More...
 
py::list ArrayOneDToPyList (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields)
 
void v_Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
 
void v_Update (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
 
- Public Member Functions inherited from Nektar::SolverUtils::Filter
SOLVER_UTILS_EXPORT Filter (const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< EquationSystem > &pEquation)
 
virtual SOLVER_UTILS_EXPORT ~Filter ()
 
SOLVER_UTILS_EXPORT void Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
 
SOLVER_UTILS_EXPORT void Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
 
SOLVER_UTILS_EXPORT void Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
 
SOLVER_UTILS_EXPORT bool IsTimeDependent ()
 

Additional Inherited Members

- Public Types inherited from Nektar::SolverUtils::Filter
typedef std::map< std::string, std::string > ParamMap
 
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 void v_Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0
 
virtual bool v_IsTimeDependent ()=0
 
- Protected Attributes inherited from Nektar::SolverUtils::Filter
LibUtilities::SessionReaderSharedPtr m_session
 
const std::weak_ptr< EquationSystemm_equ
 

Detailed Description

Filter wrapper to handle virtual function calls in Filter and its subclasses.

Definition at line 47 of file Python/Filter.cpp.

Constructor & Destructor Documentation

◆ FilterWrap()

FilterWrap::FilterWrap ( LibUtilities::SessionReaderSharedPtr  session,
std::shared_ptr< EquationSystem eqn 
)
inline

Constructor, which is identical to Filter.

Parameters
fieldInput field.

Definition at line 54 of file Python/Filter.cpp.

56 : Filter(session, eqn), py::wrapper<Filter>()
57 {
58 }
SOLVER_UTILS_EXPORT Filter(const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< EquationSystem > &pEquation)

Member Function Documentation

◆ ArrayOneDToPyList()

py::list FilterWrap::ArrayOneDToPyList ( const Array< OneD, const MultiRegions::ExpListSharedPtr > &  pFields)
inline

Definition at line 60 of file Python/Filter.cpp.

62 {
63 py::list expLists;
64
65 for (int i = 0; i < pFields.size(); ++i)
66 {
67 expLists.append(py::object(pFields[i]));
68 }
69
70 return expLists;
71 }

Referenced by v_Finalise(), v_Initialise(), and v_Update().

◆ v_Finalise()

void FilterWrap::v_Finalise ( const Array< OneD, const MultiRegions::ExpListSharedPtr > &  pFields,
const NekDouble time 
)
inlineoverridevirtual

Implements Nektar::SolverUtils::Filter.

Definition at line 87 of file Python/Filter.cpp.

90 {
91 this->get_override("Finalise")(ArrayOneDToPyList(pFields), time);
92 }
py::list ArrayOneDToPyList(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields)

References ArrayOneDToPyList().

◆ v_Initialise()

void FilterWrap::v_Initialise ( const Array< OneD, const MultiRegions::ExpListSharedPtr > &  pFields,
const NekDouble time 
)
inlineoverridevirtual

Implements Nektar::SolverUtils::Filter.

Definition at line 73 of file Python/Filter.cpp.

76 {
77 this->get_override("Initialise")(ArrayOneDToPyList(pFields), time);
78 }

References ArrayOneDToPyList().

◆ v_IsTimeDependent()

bool FilterWrap::v_IsTimeDependent ( )
inlineoverridevirtual

Implements Nektar::SolverUtils::Filter.

Definition at line 94 of file Python/Filter.cpp.

95 {
96 return this->get_override("IsTimeDependent")();
97 }

◆ v_Update()

void FilterWrap::v_Update ( const Array< OneD, const MultiRegions::ExpListSharedPtr > &  pFields,
const NekDouble time 
)
inlineoverridevirtual

Implements Nektar::SolverUtils::Filter.

Definition at line 80 of file Python/Filter.cpp.

83 {
84 this->get_override("Update")(ArrayOneDToPyList(pFields), time);
85 }

References ArrayOneDToPyList().