Nektar++
|
#include <FilterIntegral.h>
Static Public Member Functions | |
static FilterSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const std::map< std::string, std::string > &pParams) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Member Functions | |
void | v_Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) final |
Parse composite list and geometric entities to integrate over. More... | |
void | v_Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) final |
Calculate integral over requested composites. More... | |
void | v_Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) final |
Finalise the filter. More... | |
bool | v_IsTimeDependent () final |
Returns true as filter depends on time. More... | |
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 |
Private Attributes | |
size_t | m_index = 0 |
size_t | m_outputFrequency |
Frequency to write to output data file in timesteps. More... | |
size_t | m_numVariables |
Number of fields to perform integral on. More... | |
std::ofstream | m_outFile |
Out file. More... | |
LibUtilities::CommSharedPtr | m_comm |
Global communicator. More... | |
std::vector< std::string > | m_splitCompString |
Vector of composite IDs as a single string. More... | |
std::vector< std::vector< unsigned int > > | m_compVector |
Vector of vector of composites IDs as integers. More... | |
std::map< size_t, size_t > | m_geomElmtIdToExpId |
Mapping from geometry ID to expansion ID. More... | |
std::map< int, std::vector< std::pair< LocalRegions::ExpansionSharedPtr, int > > > | m_compExpMap |
Map of composite ID to vector of expansions an face/edge local ID. More... | |
Friends | |
class | MemoryManager< FilterIntegral > |
Additional Inherited Members | |
Public Types inherited from Nektar::SolverUtils::Filter | |
typedef std::map< std::string, std::string > | ParamMap |
Protected Attributes inherited from Nektar::SolverUtils::Filter | |
LibUtilities::SessionReaderSharedPtr | m_session |
const std::weak_ptr< EquationSystem > | m_equ |
Definition at line 42 of file FilterIntegral.h.
Nektar::SolverUtils::FilterIntegral::FilterIntegral | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const std::weak_ptr< EquationSystem > & | pEquation, | ||
const ParamMap & | pParams | ||
) |
Constructs the integral filter and parses filter options, opens file.
Initialise the filter and parse the session file parameters.
Definition at line 52 of file FilterIntegral.cpp.
References ASSERTL0, Nektar::LibUtilities::Equation::Evaluate(), Nektar::ParseUtils::GenerateSeqVector(), m_comm, m_compVector, Nektar::SolverUtils::Filter::m_equ, m_numVariables, m_outFile, m_outputFrequency, Nektar::SolverUtils::Filter::m_session, and m_splitCompString.
|
overridedefault |
Default destructor.
|
inlinestatic |
Creates an instance of this class.
Definition at line 48 of file FilterIntegral.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
finalprotectedvirtual |
Finalise the filter.
Closes the output data file
pFields | Field data |
time | Current time |
Implements Nektar::SolverUtils::Filter.
Definition at line 355 of file FilterIntegral.cpp.
|
finalprotectedvirtual |
Parse composite list and geometric entities to integrate over.
Initialises the integral filter and stores the composite expansions in m_compExpMap for all composites specified in the XML file
pFields | Field data |
time | Current time |
Implements Nektar::SolverUtils::Filter.
Definition at line 155 of file FilterIntegral.cpp.
References ASSERTL0, Nektar::ErrorUtil::efatal, m_compExpMap, m_compVector, m_geomElmtIdToExpId, m_splitCompString, NEKERROR, and v_Update().
|
finalprotectedvirtual |
Returns true as filter depends on time.
This is a time-dependent filter.
Implements Nektar::SolverUtils::Filter.
Definition at line 369 of file FilterIntegral.cpp.
|
finalprotectedvirtual |
Calculate integral over requested composites.
Performs the integration on the stored composite expansions and outputs in to the output data file
pFields | Field data |
time | Current time |
Implements Nektar::SolverUtils::Filter.
Definition at line 265 of file FilterIntegral.cpp.
References Nektar::ErrorUtil::efatal, m_comm, m_compExpMap, m_compVector, m_geomElmtIdToExpId, m_index, m_numVariables, m_outFile, m_outputFrequency, NEKERROR, and Nektar::LibUtilities::ReduceSum.
Referenced by v_Initialise().
|
friend |
Definition at line 1 of file FilterIntegral.h.
|
static |
Name of the class.
Definition at line 59 of file FilterIntegral.h.
|
private |
Global communicator.
Definition at line 115 of file FilterIntegral.h.
Referenced by FilterIntegral(), v_Finalise(), and v_Update().
|
private |
Map of composite ID to vector of expansions an face/edge local ID.
Definition at line 124 of file FilterIntegral.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Vector of vector of composites IDs as integers.
Definition at line 119 of file FilterIntegral.h.
Referenced by FilterIntegral(), v_Initialise(), and v_Update().
|
private |
Mapping from geometry ID to expansion ID.
Definition at line 121 of file FilterIntegral.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Definition at line 107 of file FilterIntegral.h.
Referenced by v_Update().
|
private |
Number of fields to perform integral on.
Definition at line 111 of file FilterIntegral.h.
Referenced by FilterIntegral(), and v_Update().
|
private |
Out file.
Definition at line 113 of file FilterIntegral.h.
Referenced by FilterIntegral(), v_Finalise(), and v_Update().
|
private |
Frequency to write to output data file in timesteps.
Definition at line 109 of file FilterIntegral.h.
Referenced by FilterIntegral(), and v_Update().
|
private |
Vector of composite IDs as a single string.
Definition at line 117 of file FilterIntegral.h.
Referenced by FilterIntegral(), and v_Initialise().