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;
74 "BwdTrans",
"Helmholtz",
"IProductWRTBase",
"IProductWRTDerivBase",
75 "PhysDeriv",
"PhysInterp1DScaled"};
78 "IPWrtBase",
"IPWrtDBase",
79 "PhysDeriv",
"PhysInterp1DScaled"};
100 "NoImplementationType",
136 Operator(std::vector<StdRegions::StdExpansionSharedPtr> pCollExp,
137 std::shared_ptr<CoalescedGeomData>
GeomData,
156 int coll_phys_offset) = 0;
209 "This method is not defined or valid for this class type");
221 "This method is not defined or valid for this class type");
#define COLLECTIONS_EXPORT
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
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 CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)=0
Check the validity of the supplied factor map.
StdRegions::StdExpansionSharedPtr m_stdExp
unsigned int m_numElmt
number of elements that the operator is applied on
unsigned int GetInputSize()
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 m_inputSize
number of modes or quadrature points that are passed as input to an operator
StdRegions::StdExpansionSharedPtr GetExpSharedPtr()
Get expansion pointer.
virtual int v_GetOutputSize()
This purely virtual function needs to be set-up for every operator inside Collections....
virtual int v_GetInputSize()
This purely virtual function needs to be set-up for every operator inside Collections....
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
unsigned int GetOutputSize()
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
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
StdRegions::ConstFactorMap factors
static Array< OneD, NekDouble > NullNekDouble1DArray