36 #include <boost/core/ignore_unused.hpp>
50 const std::weak_ptr<EquationSystem> &pEquation,
const ParamMap &pParams)
54 auto it = pParams.find(
"SampleFrequency");
55 if (it == pParams.end())
66 it = pParams.find(
"alpha");
67 if (it == pParams.end())
69 it = pParams.find(
"tau");
70 if (it == pParams.end())
72 ASSERTL0(
false,
"FilterMovingAverage needs either alpha or tau.");
92 it = pParams.find(
"tau");
93 if (it != pParams.end())
96 "Cannot define both alpha and tau in MovingAverage.");
111 boost::ignore_unused(pFields, time);
#define ASSERTL0(condition, msg)
NekDouble Evaluate() const
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
unsigned int m_sampleFrequency
unsigned int m_numSamples
std::vector< Array< OneD, NekDouble > > m_outFields
LibUtilities::SessionReaderSharedPtr m_session
std::map< std::string, std::string > ParamMap
static std::string className
Name of the class.
virtual void v_ProcessSample(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, std::vector< Array< OneD, NekDouble >> &fieldcoeffs, 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.
virtual SOLVER_UTILS_EXPORT ~FilterMovingAverage()
SOLVER_UTILS_EXPORT FilterMovingAverage(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const ParamMap &pParams)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
FilterFactory & GetFilterFactory()
The above copyright notice and this permission notice shall be included.
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
svtvvtp (scalar times vector plus scalar times vector):