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

virtual ~PhysDeriv_NoCollection ()
 
virtual void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output0, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp)
 Perform operation. More...
 
virtual void operator() (int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
- Public Member Functions inherited from Nektar::Collections::Operator
 Operator (std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, std::shared_ptr< CoalescedGeomData > GeomData)
 Constructor. More...
 
virtual COLLECTIONS_EXPORT ~Operator ()
 
int GetWspSize ()
 Get the size of the required workspace. More...
 

Protected Attributes

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

Private Member Functions

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

Detailed Description

Phys deriv operator using original LocalRegions implementation.

Definition at line 380 of file PhysDeriv.cpp.

Constructor & Destructor Documentation

◆ ~PhysDeriv_NoCollection()

virtual Nektar::Collections::PhysDeriv_NoCollection::~PhysDeriv_NoCollection ( )
inlinevirtual

Definition at line 385 of file PhysDeriv.cpp.

386  {
387  }

◆ PhysDeriv_NoCollection()

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

Member Function Documentation

◆ operator()() [1/2]

virtual 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 
)
inlinevirtual

Perform operation.

Implements Nektar::Collections::Operator.

Definition at line 389 of file PhysDeriv.cpp.

References ASSERTL0.

395  {
396  boost::ignore_unused(wsp);
397 
398  const int nPhys = m_expList[0]->GetTotPoints();
399  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
400 
401  // calculate local derivatives
402  switch (m_expList[0]->GetShapeDimension())
403  {
404  case 1:
405  {
406  for (int i = 0; i < m_numElmt; ++i)
407  {
408  m_expList[i]->PhysDeriv(input + i*nPhys,
409  tmp0 = output0 + i*nPhys);
410  }
411  break;
412  }
413  case 2:
414  {
415  for (int i = 0; i < m_numElmt; ++i)
416  {
417  m_expList[i]->PhysDeriv(input + i*nPhys,
418  tmp0 = output0 + i*nPhys,
419  tmp1 = output1 + i*nPhys);
420  }
421  break;
422  }
423  case 3:
424  {
425  for (int i = 0; i < m_numElmt; ++i)
426  {
427  m_expList[i]->PhysDeriv(input + i*nPhys,
428  tmp0 = output0 + i*nPhys,
429  tmp1 = output1 + i*nPhys,
430  tmp2 = output2 + i*nPhys);
431  }
432  break;
433  }
434  default:
435  ASSERTL0(false, "Unknown dimension.");
436  }
437  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
vector< StdRegions::StdExpansionSharedPtr > m_expList
Definition: PhysDeriv.cpp:459

◆ operator()() [2/2]

virtual void Nektar::Collections::PhysDeriv_NoCollection::operator() ( int  dir,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)
inlinevirtual

Implements Nektar::Collections::Operator.

Definition at line 439 of file PhysDeriv.cpp.

444  {
445  boost::ignore_unused(wsp);
446 
447  const int nPhys = m_expList[0]->GetTotPoints();
448  Array<OneD, NekDouble> tmp;
449 
450  // calculate local derivatives
451  for (int i = 0; i < m_numElmt; ++i)
452  {
453  m_expList[i]->PhysDeriv(dir, input + i*nPhys,
454  tmp = output + i*nPhys);
455  }
456  }
vector< StdRegions::StdExpansionSharedPtr > m_expList
Definition: PhysDeriv.cpp:459

Member Data Documentation

◆ m_expList

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

Definition at line 459 of file PhysDeriv.cpp.