35 #ifndef NEKTAR_LIBRARY_COLLECTIONS_OPERATOR_H
36 #define NEKTAR_LIBRARY_COLLECTIONS_OPERATOR_H
38 #include <boost/core/ignore_unused.hpp>
45 #define OPERATOR_CREATE(cname) \
46 static OperatorKey m_type; \
47 static OperatorKey m_typeArr[]; \
48 friend class MemoryManager<cname>; \
49 static OperatorSharedPtr create( \
50 std::vector<StdRegions::StdExpansionSharedPtr> pCollExp,\
51 std::shared_ptr<CoalescedGeomData> GeomData, \
52 StdRegions::FactorMap factors) \
54 return MemoryManager<cname> \
55 ::AllocateSharedPtr(pCollExp, GeomData, factors); \
63 class CoalescedGeomData;
81 "IProductWRTDerivBase",
98 "NoImplementationType",
119 std::vector<StdRegions::StdExpansionSharedPtr> pCollExp,
120 std::shared_ptr<CoalescedGeomData>
GeomData,
145 int coll_phys_offset) = 0;
193 std::vector<StdRegions::StdExpansionSharedPtr>,
#define COLLECTIONS_EXPORT
Base class for operators on a collection of elements.
unsigned int GetNumElmt()
Get expansion pointer.
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 GetWspSize()
Get the size of the required workspace.
virtual COLLECTIONS_EXPORT ~Operator()
StdRegions::StdExpansionSharedPtr GetExpSharedPtr()
Get expansion pointer.
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
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.
@ 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.
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
The above copyright notice and this permission notice shall be included.
static Array< OneD, NekDouble > NullNekDouble1DArray