Nektar++
Loading...
Searching...
No Matches
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.
 
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< LocalRegions::ExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
 Constructor.
 
virtual ~Operator ()=default
 
virtual COLLECTIONS_EXPORT void UpdateFactors (StdRegions::FactorMap factors)
 Update the supplied factor map.
 
virtual COLLECTIONS_EXPORT void UpdateVarcoeffs (StdRegions::VarCoeffMap &varcoeffs)
 Update the supplied variable coefficients.
 
unsigned int GetWspSize ()
 Get the size of the required workspace.
 
unsigned int GetNumElmt ()
 Get number of elements.
 
StdRegions::StdExpansionSharedPtr GetExpSharedPtr ()
 Get expansion pointer.
 
unsigned int GetInputSize (void)
 
unsigned int GetOutputSize (void)
 
unsigned int GetPhysSize (void)
 
unsigned int GetCoeffSize (void)
 

Protected Attributes

vector< LocalRegions::ExpansionSharedPtrm_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
 
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
 
unsigned int m_outputSize
 number of modes or quadrature points that are taken as output from an operator
 

Private Member Functions

 PhysDeriv_NoCollection (vector< LocalRegions::ExpansionSharedPtr > 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 580 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< LocalRegions::ExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData,
StdRegions::FactorMap  factors 
)
inlineprivate

Definition at line 653 of file PhysDeriv.cpp.

656 : Operator(pCollExp, pGeomData, factors), PhysDeriv_Helper()
657 {
658 m_expList = pCollExp;
659 }
Operator(std::vector< LocalRegions::ExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition Operator.cpp:66
vector< LocalRegions::ExpansionSharedPtr > m_expList

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

593 {
594 const int nPhys = m_expList[0]->GetTotPoints();
595 Array<OneD, NekDouble> tmp0, tmp1, tmp2;
596
597 // calculate local derivatives
598 switch (m_expList[0]->GetCoordim())
599 {
600 case 1:
601 {
602 for (int i = 0; i < m_numElmt; ++i)
603 {
604 m_expList[i]->PhysDeriv(input + i * nPhys,
605 tmp0 = output0 + i * nPhys);
606 }
607 break;
608 }
609 case 2:
610 {
611 for (int i = 0; i < m_numElmt; ++i)
612 {
613 m_expList[i]->PhysDeriv(input + i * nPhys,
614 tmp0 = output0 + i * nPhys,
615 tmp1 = output1 + i * nPhys);
616 }
617 break;
618 }
619 case 3:
620 {
621 for (int i = 0; i < m_numElmt; ++i)
622 {
623 m_expList[i]->PhysDeriv(
624 input + i * nPhys, tmp0 = output0 + i * nPhys,
625 tmp1 = output1 + i * nPhys, tmp2 = output2 + i * nPhys);
626 }
627 break;
628 }
629 default:
630 ASSERTL0(false, "Unknown dimension.");
631 }
632 }
#define ASSERTL0(condition, msg)
unsigned int m_numElmt
number of elements that the operator is applied on
Definition Operator.h:232

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

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

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

Member Data Documentation

◆ m_expList

vector<LocalRegions::ExpansionSharedPtr> Nektar::Collections::PhysDeriv_NoCollection::m_expList
protected

Definition at line 650 of file PhysDeriv.cpp.

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