35#ifndef NEKTAR_LIBRARY_COLLECTIONS_OPERATOR_H
36#define NEKTAR_LIBRARY_COLLECTIONS_OPERATOR_H
43#define OPERATOR_CREATE(cname) \
44 static OperatorKey m_type; \
45 static OperatorKey m_typeArr[]; \
46 friend class MemoryManager<cname>; \
47 static OperatorSharedPtr create( \
48 std::vector<StdRegions::StdExpansionSharedPtr> pCollExp, \
49 std::shared_ptr<CoalescedGeomData> GeomData, \
50 StdRegions::FactorMap factors) \
52 return MemoryManager<cname>::AllocateSharedPtr(pCollExp, GeomData, \
59class CoalescedGeomData;
76 "LinearAdvectionDiffusionReaction",
78 "IProductWRTDerivBase",
80 "PhysInterp1DScaled"};
83 "BwdTrans",
"Helmholtz",
"LinearADR",
"IPWrtBase",
84 "IPWrtDBase",
"PhysDeriv",
"PhysInterp1DScaled"};
105 "NoImplementationType",
141 Operator(std::vector<StdRegions::StdExpansionSharedPtr> pCollExp,
142 std::shared_ptr<CoalescedGeomData>
GeomData,
163 ASSERTL0(
false,
"This method needs to be re-implemented in derived "
172 "This method needs to be re-implemented in derived "
173 "operator class. Make sure it is implemented for the operator"
174 " in the .opt file");
#define COLLECTIONS_EXPORT
#define ASSERTL0(condition, msg)
Base class for operators on a collection of elements.
unsigned int GetNumElmt()
Get number of elements.
virtual ~Operator()=default
virtual COLLECTIONS_EXPORT void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp=NullNekDouble1DArray)=0
virtual COLLECTIONS_EXPORT void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp=NullNekDouble1DArray)=0
Perform operation.
virtual COLLECTIONS_EXPORT void UpdateFactors(StdRegions::FactorMap factors)
Update the supplied factor map.
StdRegions::StdExpansionSharedPtr m_stdExp
unsigned int m_outputSizeOther
Number of modes or quadrature points, opposite to m_outputSize.
unsigned int m_numElmt
number of elements that the operator is applied on
unsigned int m_inputSizeOther
Number of modes or quadrature points, opposite to m_inputSize.
unsigned int m_outputSize
number of modes or quadrature points that are taken as output from an operator
unsigned int GetWspSize()
Get the size of the required workspace.
unsigned int GetOutputSize(bool defaultOut=true)
unsigned int m_inputSize
number of modes or quadrature points that are passed as input to an operator
StdRegions::StdExpansionSharedPtr GetExpSharedPtr()
Get expansion pointer.
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
virtual COLLECTIONS_EXPORT void UpdateVarcoeffs(StdRegions::VarCoeffMap &varcoeffs)
Update the supplied variable coefficients.
unsigned int GetInputSize(bool defaultIn=true)
Provides a generic Factory class.
bool operator<(OperatorKey const &p1, OperatorKey const &p2)
Less-than comparison operator for OperatorKey objects.
std::map< OperatorType, ImplementationType > OperatorImpMap
const char *const ImplementationTypeMap[]
std::shared_ptr< Operator > OperatorSharedPtr
Shared pointer to an Operator object.
const char *const ImplementationTypeMap1[]
@ SIZE_ImplementationType
@ eLinearAdvectionDiffusionReaction
std::ostream & operator<<(std::ostream &os, OperatorKey const &p)
Stream output operator for OperatorKey objects.
const char *const OperatorTypeMap[]
std::tuple< LibUtilities::ShapeType, OperatorType, ImplementationType, ExpansionIsNodal > OperatorKey
Key for describing an Operator.
std::shared_ptr< CoalescedGeomData > CoalescedGeomDataSharedPtr
OperatorFactory & GetOperatorFactory()
Returns the singleton Operator factory object.
OperatorImpMap SetFixedImpType(ImplementationType defaultType)
simple Operator Implementation Map generator
Nektar::LibUtilities::NekFactory< OperatorKey, Operator, std::vector< StdRegions::StdExpansionSharedPtr >, CoalescedGeomDataSharedPtr, StdRegions::FactorMap > OperatorFactory
Operator factory definition.
const char *const OperatorTypeMap1[]
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
StdRegions::ConstFactorMap factors
static Array< OneD, NekDouble > NullNekDouble1DArray