46 const std::weak_ptr<EquationSystem> &pEquation,
const ParamMap &pParams)
50 auto it = pParams.find(
"SampleFrequency");
51 if (it == pParams.end())
62 it = pParams.find(
"MaxOrMin");
63 std::string sOption = it->second.c_str();
64 if (boost::iequals(sOption,
"maximum") || boost::iequals(sOption,
"max"))
68 else if (boost::iequals(sOption,
"minimum") ||
69 boost::iequals(sOption,
"min"))
75 ASSERTL1(
false,
"MaxOrMin needs to be max or min.");
100 nf = (n < pFields.size()) ? n : 0;
108 std::string firstVarName = pFields[0]->GetSession()->GetVariable(0);
109 if (boost::iequals(firstVarName,
"u"))
113 else if (boost::iequals(firstVarName,
"rho"))
126 int nf = (n < pFields.size()) ? n : 0;
128 if (pFields[nf]->GetWaveSpace())
130 pFields[nf]->HomogeneousBwdTrans(pFields[nf]->GetTotPoints(),
160 int nf = (n < pFields.size()) ? n : 0;
162 if (pFields[nf]->GetWaveSpace())
164 pFields[nf]->HomogeneousBwdTrans(pFields[nf]->GetTotPoints(),
188 for (
int i = 0; i < length; ++i)
199 for (
int i = 0; i < length; ++i)
213 int nf = (n < pFields.size()) ? n : 0;
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
NekDouble Evaluate() const
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::string m_restartFile
unsigned int m_sampleFrequency
std::vector< std::string > m_variables
unsigned int m_numSamples
LibUtilities::FieldMetaDataMap m_fieldMetaData
std::vector< Array< OneD, NekDouble > > m_outFields
SOLVER_UTILS_EXPORT void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
LibUtilities::SessionReaderSharedPtr m_session
std::map< std::string, std::string > ParamMap
ProblemType m_problemType
std::vector< Array< OneD, NekDouble > > m_curFieldsPhys
std::vector< Array< OneD, NekDouble > > m_outFieldsPhys
SOLVER_UTILS_EXPORT ~FilterMaxMinFields() override
void v_PrepareOutput(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
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.
SOLVER_UTILS_EXPORT FilterMaxMinFields(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const ParamMap &pParams)
void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
static std::string className
Name of the class.
NekDouble v_GetScale() override
void v_ProcessSample(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, const NekDouble &time) override
std::shared_ptr< SessionReader > SessionReaderSharedPtr
FilterFactory & GetFilterFactory()
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)