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
 
void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) override final
 Perform operation. More...
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) override final
 
virtual 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 COLLECTIONS_EXPORT ~Operator ()
 
unsigned int GetWspSize ()
 Get the size of the required workspace. More...
 
unsigned int GetNumElmt ()
 Get expansion pointer. More...
 
StdRegions::StdExpansionSharedPtr GetExpSharedPtr ()
 Get expansion pointer. More...
 

Protected Attributes

vector< StdRegions::StdExpansionSharedPtrm_expList
 
- Protected Attributes inherited from Nektar::Collections::Operator
bool m_isDeformed
 
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_nqe
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Phys deriv operator using original LocalRegions implementation.

Definition at line 616 of file PhysDeriv.cpp.

Constructor & Destructor Documentation

◆ ~PhysDeriv_NoCollection()

Nektar::Collections::PhysDeriv_NoCollection::~PhysDeriv_NoCollection ( )
inlinefinal

Definition at line 621 of file PhysDeriv.cpp.

622  {
623  }

◆ PhysDeriv_NoCollection()

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

Definition at line 701 of file PhysDeriv.cpp.

704  : Operator(pCollExp, pGeomData, factors)
705  {
706  m_expList = pCollExp;
707  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:43
vector< StdRegions::StdExpansionSharedPtr > m_expList
Definition: PhysDeriv.cpp:698

Member Function Documentation

◆ CheckFactors()

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

692  {
693  boost::ignore_unused(factors, coll_phys_offset);
694  ASSERTL0(false, "Not valid for this operator.");
695  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:215

References ASSERTL0.

◆ 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 
)
inlinefinaloverridevirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 625 of file PhysDeriv.cpp.

630  {
631  boost::ignore_unused(wsp);
632 
633  const int nPhys = m_expList[0]->GetTotPoints();
634  Array<OneD, NekDouble> tmp0, tmp1, tmp2;
635 
636  // calculate local derivatives
637  switch (m_expList[0]->GetShapeDimension())
638  {
639  case 1:
640  {
641  for (int i = 0; i < m_numElmt; ++i)
642  {
643  m_expList[i]->PhysDeriv(input + i * nPhys,
644  tmp0 = output0 + i * nPhys);
645  }
646  break;
647  }
648  case 2:
649  {
650  for (int i = 0; i < m_numElmt; ++i)
651  {
652  m_expList[i]->PhysDeriv(input + i * nPhys,
653  tmp0 = output0 + i * nPhys,
654  tmp1 = output1 + i * nPhys);
655  }
656  break;
657  }
658  case 3:
659  {
660  for (int i = 0; i < m_numElmt; ++i)
661  {
662  m_expList[i]->PhysDeriv(
663  input + i * nPhys, tmp0 = output0 + i * nPhys,
664  tmp1 = output1 + i * nPhys, tmp2 = output2 + i * nPhys);
665  }
666  break;
667  }
668  default:
669  ASSERTL0(false, "Unknown dimension.");
670  }
671  }

References ASSERTL0.

◆ 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 
)
inlinefinaloverridevirtual

Implements Nektar::Collections::Operator.

Definition at line 673 of file PhysDeriv.cpp.

676  {
677  boost::ignore_unused(wsp);
678 
679  const int nPhys = m_expList[0]->GetTotPoints();
680  Array<OneD, NekDouble> tmp;
681 
682  // calculate local derivatives
683  for (int i = 0; i < m_numElmt; ++i)
684  {
685  m_expList[i]->PhysDeriv(dir, input + i * nPhys,
686  tmp = output + i * nPhys);
687  }
688  }

Member Data Documentation

◆ m_expList

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

Definition at line 698 of file PhysDeriv.cpp.