Nektar++
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::Collections::IProductWRTDerivBase_NoCollection Class Referencefinal

Inner product WRT deriv base operator using LocalRegions implementation. More...

Inheritance diagram for Nektar::Collections::IProductWRTDerivBase_NoCollection:
[legend]

Public Member Functions

 ~IProductWRTDerivBase_NoCollection () final=default
 
void operator() (const Array< OneD, const NekDouble > &entry0, Array< OneD, NekDouble > &entry1, Array< OneD, NekDouble > &entry2, Array< OneD, NekDouble > &entry3, Array< OneD, NekDouble > &wsp) final
 Perform operation. More...
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
 
void CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset) override
 Check the validity of the supplied factor map. More...
 
- Public Member Functions inherited from Nektar::Collections::Operator
 Operator (std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
 Constructor. More...
 
virtual ~Operator ()=default
 
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. More...
 
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 CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset)=0
 Check the validity of the supplied factor map. More...
 
unsigned int GetWspSize ()
 Get the size of the required workspace. More...
 
unsigned int GetNumElmt ()
 Get number of elements. More...
 
StdRegions::StdExpansionSharedPtr GetExpSharedPtr ()
 Get expansion pointer. More...
 
unsigned int GetInputSize ()
 
unsigned int GetOutputSize ()
 

Protected Attributes

int m_dim
 
int m_coordim
 
vector< StdRegions::StdExpansionSharedPtrm_expList
 
- Protected Attributes inherited from Nektar::Collections::Operator
bool m_isDeformed
 
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 number of elements that the operator is applied on More...
 
unsigned int m_nqe
 
unsigned int m_wspSize
 
unsigned int m_inputSize
 number of modes or quadrature points that are passed as input to an operator More...
 
unsigned int m_outputSize
 number of modes or quadrature points that are taken as output from an operator More...
 

Private Member Functions

 IProductWRTDerivBase_NoCollection (vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 
- Private Member Functions inherited from Nektar::Collections::IProductWRTDerivBase_Helper
 IProductWRTDerivBase_Helper ()
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Collections::Operator
virtual int v_GetInputSize ()
 This purely virtual function needs to be set-up for every operator inside Collections. It is responsible for returning the size of input collection, that the operator is applied on either in physical or coefficient space. More...
 
virtual int v_GetOutputSize ()
 This purely virtual function needs to be set-up for every operator inside Collections. It is responsible for returning the output size either in physical or coefficient space of an operator inside Collections. More...
 

Detailed Description

Inner product WRT deriv base operator using LocalRegions implementation.

Definition at line 639 of file IProductWRTDerivBase.cpp.

Constructor & Destructor Documentation

◆ ~IProductWRTDerivBase_NoCollection()

Nektar::Collections::IProductWRTDerivBase_NoCollection::~IProductWRTDerivBase_NoCollection ( )
finaldefault

◆ IProductWRTDerivBase_NoCollection()

Nektar::Collections::IProductWRTDerivBase_NoCollection::IProductWRTDerivBase_NoCollection ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData,
StdRegions::FactorMap  factors 
)
inlineprivate

Definition at line 703 of file IProductWRTDerivBase.cpp.

706 : Operator(pCollExp, pGeomData, factors), IProductWRTDerivBase_Helper()
707 {
708 m_expList = pCollExp;
709 m_dim = pCollExp[0]->GetNumBases();
710 m_coordim = pCollExp[0]->GetCoordim();
711 }
vector< StdRegions::StdExpansionSharedPtr > m_expList
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:66
StdRegions::ConstFactorMap factors

References m_coordim, m_dim, and m_expList.

Member Function Documentation

◆ CheckFactors()

void Nektar::Collections::IProductWRTDerivBase_NoCollection::CheckFactors ( StdRegions::FactorMap  factors,
int  coll_phys_offset 
)
inlineoverridevirtual

Check the validity of the supplied factor map.

Implements Nektar::Collections::Operator.

Definition at line 691 of file IProductWRTDerivBase.cpp.

693 {
694 ASSERTL0(false, "Not valid for this operator.");
695 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208

References ASSERTL0.

◆ operator()() [1/2]

void Nektar::Collections::IProductWRTDerivBase_NoCollection::operator() ( const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output0,
Array< OneD, NekDouble > &  output1,
Array< OneD, NekDouble > &  output2,
Array< OneD, NekDouble > &  wsp 
)
inlinefinalvirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 647 of file IProductWRTDerivBase.cpp.

652 {
653 unsigned int nmodes = m_expList[0]->GetNcoeffs();
654 unsigned int nPhys = m_expList[0]->GetTotPoints();
655 Array<OneD, NekDouble> tmp(nmodes), tmp1;
656
657 Array<OneD, Array<OneD, const NekDouble>> in(3);
658 Array<OneD, NekDouble> output;
659 in[0] = entry0;
660 in[1] = entry1;
661 in[2] = entry2;
662
663 output = (m_coordim == 3) ? entry3 : (m_coordim == 2) ? entry2 : entry1;
664
665 for (int n = 0; n < m_numElmt; ++n)
666 {
667 m_expList[n]->IProductWRTDerivBase(0, in[0] + n * nPhys,
668 tmp1 = output + n * nmodes);
669 }
670
671 for (int i = 1; i < m_dim; ++i)
672 {
673 for (int n = 0; n < m_numElmt; ++n)
674 {
675 m_expList[n]->IProductWRTDerivBase(i, in[i] + n * nPhys, tmp);
676
677 Vmath::Vadd(nmodes, tmp, 1, output + n * nmodes, 1,
678 tmp1 = output + n * nmodes, 1);
679 }
680 }
681 }
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:190
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.hpp:180

References m_coordim, m_dim, m_expList, Nektar::Collections::Operator::m_numElmt, and Vmath::Vadd().

◆ operator()() [2/2]

void Nektar::Collections::IProductWRTDerivBase_NoCollection::operator() ( int  dir,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)
inlinefinalvirtual

Implements Nektar::Collections::Operator.

Definition at line 683 of file IProductWRTDerivBase.cpp.

687 {
688 NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
689 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202

References Nektar::ErrorUtil::efatal, and NEKERROR.

Member Data Documentation

◆ m_coordim

int Nektar::Collections::IProductWRTDerivBase_NoCollection::m_coordim
protected

Definition at line 699 of file IProductWRTDerivBase.cpp.

Referenced by IProductWRTDerivBase_NoCollection(), and operator()().

◆ m_dim

int Nektar::Collections::IProductWRTDerivBase_NoCollection::m_dim
protected

Definition at line 698 of file IProductWRTDerivBase.cpp.

Referenced by IProductWRTDerivBase_NoCollection(), and operator()().

◆ m_expList

vector<StdRegions::StdExpansionSharedPtr> Nektar::Collections::IProductWRTDerivBase_NoCollection::m_expList
protected

Definition at line 700 of file IProductWRTDerivBase.cpp.

Referenced by IProductWRTDerivBase_NoCollection(), and operator()().