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

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) final
 Perform operation. More...
 
void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
 
virtual void CheckFactors (StdRegions::FactorMap factors, int coll_phys_offset)
 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 642 of file PhysDeriv.cpp.

Constructor & Destructor Documentation

◆ ~PhysDeriv_NoCollection()

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

Definition at line 647 of file PhysDeriv.cpp.

648  {
649  }

◆ PhysDeriv_NoCollection()

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

Definition at line 730 of file PhysDeriv.cpp.

734  : Operator(pCollExp, pGeomData, factors)
735  {
736  m_expList = pCollExp;
737  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData, StdRegions::FactorMap factors)
Constructor.
Definition: Operator.cpp:41
vector< StdRegions::StdExpansionSharedPtr > m_expList
Definition: PhysDeriv.cpp:727

Member Function Documentation

◆ CheckFactors()

virtual void Nektar::Collections::PhysDeriv_NoCollection::CheckFactors ( StdRegions::FactorMap  factors,
int  coll_phys_offset 
)
inlinevirtual

Check the validity of the supplied factor map.

Implements Nektar::Collections::Operator.

Definition at line 719 of file PhysDeriv.cpp.

721  {
722  boost::ignore_unused(factors, coll_phys_offset);
723  ASSERTL0(false, "Not valid for this operator.");
724  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216

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 
)
inlinefinalvirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 651 of file PhysDeriv.cpp.

657  {
658  boost::ignore_unused(wsp);
659 
660  const int nPhys = m_expList[0]->GetTotPoints();
661  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
662 
663  // calculate local derivatives
664  switch (m_expList[0]->GetShapeDimension())
665  {
666  case 1:
667  {
668  for (int i = 0; i < m_numElmt; ++i)
669  {
670  m_expList[i]->PhysDeriv(input + i*nPhys,
671  tmp0 = output0 + i*nPhys);
672  }
673  break;
674  }
675  case 2:
676  {
677  for (int i = 0; i < m_numElmt; ++i)
678  {
679  m_expList[i]->PhysDeriv(input + i*nPhys,
680  tmp0 = output0 + i*nPhys,
681  tmp1 = output1 + i*nPhys);
682  }
683  break;
684  }
685  case 3:
686  {
687  for (int i = 0; i < m_numElmt; ++i)
688  {
689  m_expList[i]->PhysDeriv(input + i*nPhys,
690  tmp0 = output0 + i*nPhys,
691  tmp1 = output1 + i*nPhys,
692  tmp2 = output2 + i*nPhys);
693  }
694  break;
695  }
696  default:
697  ASSERTL0(false, "Unknown dimension.");
698  }
699  }

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 
)
inlinefinalvirtual

Implements Nektar::Collections::Operator.

Definition at line 701 of file PhysDeriv.cpp.

705  {
706  boost::ignore_unused(wsp);
707 
708  const int nPhys = m_expList[0]->GetTotPoints();
709  Array<OneD, NekDouble> tmp;
710 
711  // calculate local derivatives
712  for (int i = 0; i < m_numElmt; ++i)
713  {
714  m_expList[i]->PhysDeriv(dir, input + i*nPhys,
715  tmp = output + i*nPhys);
716  }
717  }

Member Data Documentation

◆ m_expList

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

Definition at line 727 of file PhysDeriv.cpp.