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

Inner product operator using element-wise operation. More...

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

Public Member Functions

virtual ~IProductWRTBase_IterPerExp ()
 
virtual void operator() (const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, 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

Array< OneD, NekDoublem_jac
 
- Protected Attributes inherited from Nektar::Collections::Operator
StdRegions::StdExpansionSharedPtr m_stdExp
 
unsigned int m_numElmt
 
unsigned int m_wspSize
 

Private Member Functions

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

Detailed Description

Inner product operator using element-wise operation.

Definition at line 149 of file IProductWRTBase.cpp.

Constructor & Destructor Documentation

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

Definition at line 154 of file IProductWRTBase.cpp.

155  {
156  }
Nektar::Collections::IProductWRTBase_IterPerExp::IProductWRTBase_IterPerExp ( vector< StdRegions::StdExpansionSharedPtr pCollExp,
CoalescedGeomDataSharedPtr  pGeomData 
)
inlineprivate

Definition at line 195 of file IProductWRTBase.cpp.

198  : Operator(pCollExp, pGeomData)
199  {
200  int nqtot = 1;
201  LibUtilities::PointsKeyVector PtsKey = m_stdExp->GetPointsKeys();
202  for(int i = 0; i < PtsKey.size(); ++i)
203  {
204  nqtot *= PtsKey[i].GetNumPoints();
205  }
206 
207  m_jac = pGeomData->GetJacWithStdWeights(pCollExp);
208 
209  m_wspSize = nqtot*m_numElmt;
210  }
Operator(std::vector< StdRegions::StdExpansionSharedPtr > pCollExp, boost::shared_ptr< CoalescedGeomData > GeomData)
Constructor.
Definition: Operator.h:112
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:242
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:146

Member Function Documentation

virtual void Nektar::Collections::IProductWRTBase_IterPerExp::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 158 of file IProductWRTBase.cpp.

References ASSERTL1, and Vmath::Vmul().

164  {
165  ASSERTL1(wsp.num_elements() == m_wspSize,
166  "Incorrect workspace size");
167 
168  const int nCoeffs = m_stdExp->GetNcoeffs();
169  const int nPhys = m_stdExp->GetTotPoints();
170  Array<OneD, NekDouble> tmp;
171 
172  Vmath::Vmul(m_jac.num_elements(),m_jac,1,input,1,wsp,1);
173 
174  for (int i = 0; i < m_numElmt; ++i)
175  {
176  m_stdExp->IProductWRTBase_SumFac(wsp + i*nPhys,
177  tmp = output + i*nCoeffs,
178  false);
179  }
180  }
StdRegions::StdExpansionSharedPtr m_stdExp
Definition: Operator.h:146
#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::IProductWRTBase_IterPerExp::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 182 of file IProductWRTBase.cpp.

References ASSERTL0.

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

Member Data Documentation

Array<OneD, NekDouble> Nektar::Collections::IProductWRTBase_IterPerExp::m_jac
protected

Definition at line 192 of file IProductWRTBase.cpp.