Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::Collections::PhysDeriv_SumFac_Seg Class Reference

Phys deriv operator using sum-factorisation (Segment) More...

Inheritance diagram for Nektar::Collections::PhysDeriv_SumFac_Seg:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Collections::PhysDeriv_SumFac_Seg:
Collaboration graph
[legend]

Public Member Functions

virtual ~PhysDeriv_SumFac_Seg ()
 
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, boost::shared_ptr< CoalescedGeomData > GeomData)
 Constructor. More...
 
virtual COLLECTIONS_EXPORT ~Operator ()
 
int GetWspSize ()
 Get the size of the required workspace. More...
 

Protected Attributes

int m_coordim
 
const int m_nquad0
 
Array< TwoD, const NekDoublem_derivFac
 
NekDoublem_Deriv0
 
- Protected Attributes inherited from Nektar::Collections::Operator
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Phys deriv operator using sum-factorisation (Segment)

Definition at line 506 of file PhysDeriv.cpp.

Constructor & Destructor Documentation

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

Definition at line 511 of file PhysDeriv.cpp.

512  {
513  }
Nektar::Collections::PhysDeriv_SumFac_Seg::PhysDeriv_SumFac_Seg ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData 
)
inlineprivate

Definition at line 579 of file PhysDeriv.cpp.

582  : Operator (pCollExp, pGeomData),
583  m_nquad0 (m_stdExp->GetNumPoints(0))
584  {
585  LibUtilities::PointsKeyVector PtsKey = m_stdExp->GetPointsKeys();
586  m_coordim = m_stdExp->GetCoordim();
587 
588  m_derivFac = pGeomData->GetDerivFactors(pCollExp);
589 
590  m_Deriv0 = &((m_stdExp->GetBasis(0)->GetD())->GetPtr())[0];
592  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
Constructor.
Definition: Operator.h:112
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:242
Array< TwoD, const NekDouble > m_derivFac
Definition: PhysDeriv.cpp:575
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:146

Member Function Documentation

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

References ASSERTL1, and Vmath::Vmul().

521  {
522  const int nqcol = m_nquad0*m_numElmt;
523 
524  ASSERTL1(wsp.num_elements() == m_wspSize,
525  "Incorrect workspace size");
526  ASSERTL1(input.num_elements() >= nqcol,
527  "Incorrect input size");
528 
529  Array<OneD, NekDouble> diff0(nqcol, wsp);
530 
531  Blas::Dgemm('N', 'N', m_nquad0, m_numElmt,
532  m_nquad0, 1.0, m_Deriv0, m_nquad0,
533  input.get(), m_nquad0, 0.0,
534  diff0.get(), m_nquad0);
535 
536  Vmath::Vmul (nqcol, m_derivFac[0], 1, diff0, 1, output0, 1);
537 
538  if (m_coordim == 2)
539  {
540  Vmath::Vmul (nqcol, m_derivFac[1], 1, diff0, 1, output1, 1);
541  }
542  else if (m_coordim == 3)
543  {
544  Vmath::Vmul (nqcol, m_derivFac[1], 1, diff0, 1, output1, 1);
545  Vmath::Vmul (nqcol, m_derivFac[2], 1, diff0, 1, output2, 1);
546  }
547  }
Array< TwoD, const NekDouble > m_derivFac
Definition: PhysDeriv.cpp:575
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183
virtual void Nektar::Collections::PhysDeriv_SumFac_Seg::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 549 of file PhysDeriv.cpp.

References ASSERTL1, and Vmath::Vmul().

554  {
555  const int nqcol = m_nquad0*m_numElmt;
556 
557  ASSERTL1(wsp.num_elements() == m_wspSize,
558  "Incorrect workspace size");
559  ASSERTL1(input.num_elements() >= nqcol,
560  "Incorrect input size");
561 
562  Array<OneD, NekDouble> diff0(nqcol, wsp);
563 
564  Blas::Dgemm('N', 'N', m_nquad0, m_numElmt,
565  m_nquad0, 1.0, m_Deriv0, m_nquad0,
566  input.get(), m_nquad0, 0.0,
567  diff0.get(), m_nquad0);
568 
569  Vmath::Vmul(nqcol, m_derivFac[dir], 1, diff0, 1, output, 1);
570  }
Array< TwoD, const NekDouble > m_derivFac
Definition: PhysDeriv.cpp:575
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183

Member Data Documentation

int Nektar::Collections::PhysDeriv_SumFac_Seg::m_coordim
protected

Definition at line 573 of file PhysDeriv.cpp.

NekDouble* Nektar::Collections::PhysDeriv_SumFac_Seg::m_Deriv0
protected

Definition at line 576 of file PhysDeriv.cpp.

Array<TwoD, const NekDouble> Nektar::Collections::PhysDeriv_SumFac_Seg::m_derivFac
protected

Definition at line 575 of file PhysDeriv.cpp.

const int Nektar::Collections::PhysDeriv_SumFac_Seg::m_nquad0
protected

Definition at line 574 of file PhysDeriv.cpp.