36 #include <boost/core/ignore_unused.hpp>
50 const std::weak_ptr<EquationSystem> &pEquation,
55 auto it = pParams.find(
"SampleFrequency");
56 if (it == pParams.end())
68 it = pParams.find(
"alpha");
69 if (it == pParams.end())
71 it = pParams.find(
"tau");
72 if (it == pParams.end())
74 ASSERTL0(
false,
"FilterMovingAverage needs either alpha or tau.");
96 it = pParams.find(
"tau");
97 if (it != pParams.end())
100 "Cannot define both alpha and tau in MovingAverage.");
116 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.
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 void v_ProcessSample(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, std::vector< Array< OneD, NekDouble > > &fieldcoeffs, const NekDouble &time)
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)
vvtvvtp (scalar times vector plus scalar times vector):