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::IProductWRTDerivBase_NoCollection Class Reference

Inner product WRT deriv base operator using LocalRegions implementation. More...

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

Public Member Functions

virtual ~IProductWRTDerivBase_NoCollection ()
 
virtual void operator() (const Array< OneD, const NekDouble > &entry0, Array< OneD, NekDouble > &entry1, Array< OneD, NekDouble > &entry2, Array< OneD, NekDouble > &entry3, 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_dim
 
int m_coordim
 
vector
< StdRegions::StdExpansionSharedPtr
m_expList
 
- Protected Attributes inherited from Nektar::Collections::Operator
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Inner product WRT deriv base operator using LocalRegions implementation.

Definition at line 378 of file IProductWRTDerivBase.cpp.

Constructor & Destructor Documentation

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

Definition at line 383 of file IProductWRTDerivBase.cpp.

384  {
385  }
Nektar::Collections::IProductWRTDerivBase_NoCollection::IProductWRTDerivBase_NoCollection ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData 
)
inlineprivate

Definition at line 439 of file IProductWRTDerivBase.cpp.

442  : Operator(pCollExp, pGeomData)
443  {
444  m_expList = pCollExp;
445  m_dim = pCollExp[0]->GetNumBases();
446  m_coordim = pCollExp[0]->GetCoordim();
447  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
Constructor.
Definition: Operator.h:112
vector< StdRegions::StdExpansionSharedPtr > m_expList

Member Function Documentation

virtual void Nektar::Collections::IProductWRTDerivBase_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 387 of file IProductWRTDerivBase.cpp.

References Vmath::Vadd().

393  {
394  unsigned int nmodes = m_expList[0]->GetNcoeffs();
395  unsigned int nPhys = m_expList[0]->GetTotPoints();
396  Array<OneD, NekDouble> tmp(nmodes),tmp1;
397 
398  Array<OneD, Array<OneD, const NekDouble> > in(3);
399  Array<OneD, NekDouble> output;
400  in[0] = entry0; in[1] = entry1; in[2] = entry2;
401 
402  output = (m_coordim == 3)? entry3: (m_coordim == 2)?
403  entry2: entry1;
404 
405  for(int n = 0; n < m_numElmt; ++n)
406  {
407  m_expList[n]->IProductWRTDerivBase(0,
408  in[0] + n * nPhys,
409  tmp1 = output + n * nmodes);
410  }
411 
412  for(int i = 1; i < m_dim; ++i)
413  {
414  for(int n = 0; n < m_numElmt; ++n)
415  {
416  m_expList[n]->IProductWRTDerivBase(i,in[i]+n*nPhys,tmp);
417 
418  Vmath::Vadd(nmodes,tmp,1,output+n*nmodes,1,
419  tmp1 = output+n*nmodes,1);
420  }
421  }
422  }
vector< StdRegions::StdExpansionSharedPtr > m_expList
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:299
virtual void Nektar::Collections::IProductWRTDerivBase_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 424 of file IProductWRTDerivBase.cpp.

References ASSERTL0.

429  {
430  ASSERTL0(false, "Not valid for this operator.");
431  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198

Member Data Documentation

int Nektar::Collections::IProductWRTDerivBase_NoCollection::m_coordim
protected

Definition at line 435 of file IProductWRTDerivBase.cpp.

int Nektar::Collections::IProductWRTDerivBase_NoCollection::m_dim
protected

Definition at line 434 of file IProductWRTDerivBase.cpp.

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

Definition at line 436 of file IProductWRTDerivBase.cpp.