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

Phys deriv operator using original LocalRegions implementation. More...

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

Public Member Functions

 ~PhysDeriv_NoCollection () final=default
 
void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, 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
 
- 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 UpdateFactors (StdRegions::FactorMap factors)
 Update the supplied factor map. More...
 
virtual COLLECTIONS_EXPORT void UpdateVarcoeffs (StdRegions::VarCoeffMap &varcoeffs)
 Update the supplied variable coefficients. 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 (bool defaultIn=true)
 
unsigned int GetOutputSize (bool defaultOut=true)
 

Protected Attributes

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...
 
unsigned int m_inputSizeOther
 Number of modes or quadrature points, opposite to m_inputSize. More...
 
unsigned int m_outputSizeOther
 Number of modes or quadrature points, opposite to m_outputSize. More...
 

Private Member Functions

 PhysDeriv_NoCollection (vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Collections::PhysDeriv_Helper
 PhysDeriv_Helper ()
 

Detailed Description

Phys deriv operator using original LocalRegions implementation.

Definition at line 593 of file PhysDeriv.cpp.

Constructor & Destructor Documentation

◆ ~PhysDeriv_NoCollection()

Nektar::Collections::PhysDeriv_NoCollection::~PhysDeriv_NoCollection ( )
finaldefault

◆ PhysDeriv_NoCollection()

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

Definition at line 666 of file PhysDeriv.cpp.

669 : Operator(pCollExp, pGeomData, factors), PhysDeriv_Helper()
670 {
671 m_expList = pCollExp;
672 }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:66
vector< StdRegions::StdExpansionSharedPtr > m_expList
Definition: PhysDeriv.cpp:663
StdRegions::ConstFactorMap factors

References m_expList.

Member Function Documentation

◆ operator()() [1/2]

void Nektar::Collections::PhysDeriv_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 601 of file PhysDeriv.cpp.

606 {
607 const int nPhys = m_expList[0]->GetTotPoints();
608 Array<OneD, NekDouble> tmp0, tmp1, tmp2;
609
610 // calculate local derivatives
611 switch (m_expList[0]->GetShapeDimension())
612 {
613 case 1:
614 {
615 for (int i = 0; i < m_numElmt; ++i)
616 {
617 m_expList[i]->PhysDeriv(input + i * nPhys,
618 tmp0 = output0 + i * nPhys);
619 }
620 break;
621 }
622 case 2:
623 {
624 for (int i = 0; i < m_numElmt; ++i)
625 {
626 m_expList[i]->PhysDeriv(input + i * nPhys,
627 tmp0 = output0 + i * nPhys,
628 tmp1 = output1 + i * nPhys);
629 }
630 break;
631 }
632 case 3:
633 {
634 for (int i = 0; i < m_numElmt; ++i)
635 {
636 m_expList[i]->PhysDeriv(
637 input + i * nPhys, tmp0 = output0 + i * nPhys,
638 tmp1 = output1 + i * nPhys, tmp2 = output2 + i * nPhys);
639 }
640 break;
641 }
642 default:
643 ASSERTL0(false, "Unknown dimension.");
644 }
645 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208
unsigned int m_numElmt
number of elements that the operator is applied on
Definition: Operator.h:219

References ASSERTL0, m_expList, and Nektar::Collections::Operator::m_numElmt.

◆ operator()() [2/2]

void Nektar::Collections::PhysDeriv_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 647 of file PhysDeriv.cpp.

650 {
651 const int nPhys = m_expList[0]->GetTotPoints();
652 Array<OneD, NekDouble> tmp;
653
654 // calculate local derivatives
655 for (int i = 0; i < m_numElmt; ++i)
656 {
657 m_expList[i]->PhysDeriv(dir, input + i * nPhys,
658 tmp = output + i * nPhys);
659 }
660 }

References m_expList, and Nektar::Collections::Operator::m_numElmt.

Member Data Documentation

◆ m_expList

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

Definition at line 663 of file PhysDeriv.cpp.

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