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 578 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 651 of file PhysDeriv.cpp.

654 : Operator(pCollExp, pGeomData, factors), PhysDeriv_Helper()
655 {
656 m_expList = pCollExp;
657 }
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:648
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 586 of file PhysDeriv.cpp.

591 {
592 const int nPhys = m_expList[0]->GetTotPoints();
593 Array<OneD, NekDouble> tmp0, tmp1, tmp2;
594
595 // calculate local derivatives
596 switch (m_expList[0]->GetShapeDimension())
597 {
598 case 1:
599 {
600 for (int i = 0; i < m_numElmt; ++i)
601 {
602 m_expList[i]->PhysDeriv(input + i * nPhys,
603 tmp0 = output0 + i * nPhys);
604 }
605 break;
606 }
607 case 2:
608 {
609 for (int i = 0; i < m_numElmt; ++i)
610 {
611 m_expList[i]->PhysDeriv(input + i * nPhys,
612 tmp0 = output0 + i * nPhys,
613 tmp1 = output1 + i * nPhys);
614 }
615 break;
616 }
617 case 3:
618 {
619 for (int i = 0; i < m_numElmt; ++i)
620 {
621 m_expList[i]->PhysDeriv(
622 input + i * nPhys, tmp0 = output0 + i * nPhys,
623 tmp1 = output1 + i * nPhys, tmp2 = output2 + i * nPhys);
624 }
625 break;
626 }
627 default:
628 ASSERTL0(false, "Unknown dimension.");
629 }
630 }
#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 632 of file PhysDeriv.cpp.

635 {
636 const int nPhys = m_expList[0]->GetTotPoints();
637 Array<OneD, NekDouble> tmp;
638
639 // calculate local derivatives
640 for (int i = 0; i < m_numElmt; ++i)
641 {
642 m_expList[i]->PhysDeriv(dir, input + i * nPhys,
643 tmp = output + i * nPhys);
644 }
645 }

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 648 of file PhysDeriv.cpp.

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