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>::AllocateSharedPtr(pCollExp, GeomData, \
63class CoalescedGeomData;
78 "IProductWRTDerivBase",
"PhysDeriv"};
81 "IPWrtDBase",
"PhysDeriv "};
102 "NoImplementationType",
122 Operator(std::vector<StdRegions::StdExpansionSharedPtr> pCollExp,
123 std::shared_ptr<CoalescedGeomData>
GeomData,
143 int coll_phys_offset) = 0;
#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.
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
The above copyright notice and this permission notice shall be included.
static Array< OneD, NekDouble > NullNekDouble1DArray