Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::LibUtilities::Points< DataT > Class Template Reference

Stores a set of points of datatype DataT, defined by a PointKey. More...

#include <FoundationsFwd.hpp>

Collaboration diagram for Nektar::LibUtilities::Points< DataT >:
Collaboration graph
[legend]

Public Types

typedef DataT DataType
 
typedef boost::shared_ptr
< NekMatrix< DataType > > 
MatrixSharedPtrType
 

Public Member Functions

virtual ~Points ()
 
virtual void Initialize (void)
 
unsigned int GetPointsDim () const
 
unsigned int GetNumPoints () const
 
unsigned int GetTotNumPoints () const
 
PointsType GetPointsType () const
 
const Array< OneD, const
DataType > & 
GetZ () const
 
const Array< OneD, const
DataType > & 
GetW () const
 
void GetZW (Array< OneD, const DataType > &z, Array< OneD, const DataType > &w) const
 
void GetPoints (Array< OneD, const DataType > &x) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y, Array< OneD, const DataType > &z) const
 
const MatrixSharedPtrTypeGetD (Direction dir=xDir) const
 
virtual const MatrixSharedPtrType GetI (const PointsKey &pkey)
 
virtual const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x)
 
virtual const MatrixSharedPtrType GetI (unsigned int numpoints, const Array< OneD, const DataType > &x)
 
virtual const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
 
virtual const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
 
virtual const MatrixSharedPtrType GetGalerkinProjection (const PointsKey &pkey)
 

Protected Member Functions

virtual void CalculatePoints ()
 
virtual void CalculateWeights ()
 
virtual void CalculateDerivMatrix ()
 
 Points (const PointsKey &key)
 

Protected Attributes

PointsKey m_pointsKey
 
Array< OneD, DataTypem_points [3]
 
Array< OneD, DataTypem_weights
 
MatrixSharedPtrType m_derivmatrix [3]
 
NekManager< PointsKey,
NekMatrix< DataType >
, PointsKey::opLess
m_InterpManager
 
NekManager< PointsKey,
NekMatrix< DataType >
, PointsKey::opLess
m_GalerkinProjectionManager
 

Private Member Functions

 Points (const Points &pts)
 
 Points ()
 

Detailed Description

template<typename DataT>
class Nektar::LibUtilities::Points< DataT >

Stores a set of points of datatype DataT, defined by a PointKey.

This encapsulates a set of points, specified by a PointKey. The class stores not only the point coordinates, but also the integration weights and derivative matrix coefficients. Memory is allocated from the memory pool if in use.

Definition at line 69 of file FoundationsFwd.hpp.

Member Typedef Documentation

template<typename DataT>
typedef DataT Nektar::LibUtilities::Points< DataT >::DataType

Definition at line 227 of file Points.h.

template<typename DataT>
typedef boost::shared_ptr<NekMatrix<DataType> > Nektar::LibUtilities::Points< DataT >::MatrixSharedPtrType

Definition at line 228 of file Points.h.

Constructor & Destructor Documentation

template<typename DataT>
virtual Nektar::LibUtilities::Points< DataT >::~Points ( )
inlinevirtual

Definition at line 230 of file Points.h.

231  {
232  }
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( const PointsKey key)
inlineprotected

Definition at line 380 of file Points.h.

380  :m_pointsKey(key)
381  {
382  }
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( const Points< DataT > &  pts)
inlineprivate

Definition at line 386 of file Points.h.

387  {
388  NEKERROR(ErrorUtil::efatal,"Copy Constructor for Points should not be called");
389  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:158
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( )
inlineprivate

Definition at line 390 of file Points.h.

391  {
392  NEKERROR(ErrorUtil::efatal,"Default Constructor for Points should not be called");
393  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:158

Member Function Documentation

template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculateDerivMatrix ( )
inlineprotectedvirtual
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculatePoints ( )
inlineprotectedvirtual
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculateWeights ( )
inlineprotectedvirtual
template<typename DataT>
const MatrixSharedPtrType& Nektar::LibUtilities::Points< DataT >::GetD ( Direction  dir = xDir) const
inline

Definition at line 299 of file Points.h.

300  {
301  return m_derivmatrix[(int)dir];
302  }
MatrixSharedPtrType m_derivmatrix[3]
Definition: Points.h:351
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetGalerkinProjection ( const PointsKey pkey)
inlinevirtual

Reimplemented in Nektar::LibUtilities::GaussPoints.

Definition at line 340 of file Points.h.

341  {
342  ASSERTL0(false, "Method not implemented ");
343  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
344  return returnval;
345  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const PointsKey pkey)
inlinevirtual

Reimplemented in Nektar::LibUtilities::NodalPrismEvenlySpaced, Nektar::LibUtilities::NodalTetEvenlySpaced, Nektar::LibUtilities::NodalTriFekete, Nektar::LibUtilities::NodalTriEvenlySpaced, Nektar::LibUtilities::PolyEPoints, Nektar::LibUtilities::NodalTetElec, Nektar::LibUtilities::NodalTriElec, Nektar::LibUtilities::FourierPoints, Nektar::LibUtilities::FourierSingleModePoints, Nektar::LibUtilities::GaussPoints, and Nektar::LibUtilities::BLPoints.

Definition at line 304 of file Points.h.

305  {
306  ASSERTL0(false, "Method not implemented ");
307  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
308  return returnval;
309  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const Array< OneD, const DataType > &  x)
inlinevirtual

Reimplemented in Nektar::LibUtilities::PolyEPoints, Nektar::LibUtilities::BLPoints, Nektar::LibUtilities::FourierPoints, Nektar::LibUtilities::FourierSingleModePoints, and Nektar::LibUtilities::GaussPoints.

Definition at line 311 of file Points.h.

312  {
313  ASSERTL0(false, "Method not implemented");
314  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
315  return returnval;
316  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( unsigned int  numpoints,
const Array< OneD, const DataType > &  x 
)
inlinevirtual

Reimplemented in Nektar::LibUtilities::PolyEPoints, Nektar::LibUtilities::BLPoints, Nektar::LibUtilities::FourierPoints, Nektar::LibUtilities::FourierSingleModePoints, and Nektar::LibUtilities::GaussPoints.

Definition at line 318 of file Points.h.

319  {
320  ASSERTL0(false, "Method not implemented");
321  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
322  return returnval;
323  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const Array< OneD, const DataType > &  x,
const Array< OneD, const DataType > &  y 
)
inlinevirtual

Reimplemented in Nektar::LibUtilities::NodalTriFekete, Nektar::LibUtilities::NodalTriEvenlySpaced, and Nektar::LibUtilities::NodalTriElec.

Definition at line 325 of file Points.h.

326  {
327  ASSERTL0(false, "Method not implemented");
328  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
329  return returnval;
330  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const Array< OneD, const DataType > &  x,
const Array< OneD, const DataType > &  y,
const Array< OneD, const DataType > &  z 
)
inlinevirtual

Reimplemented in Nektar::LibUtilities::NodalPrismEvenlySpaced, Nektar::LibUtilities::NodalTetEvenlySpaced, and Nektar::LibUtilities::NodalTetElec.

Definition at line 332 of file Points.h.

334  {
335  ASSERTL0(false, "Method not implemented");
336  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
337  return returnval;
338  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetNumPoints ( ) const
inline

Definition at line 246 of file Points.h.

247  {
248  return m_pointsKey.GetNumPoints();
249  }
unsigned int GetNumPoints() const
Definition: Points.h:106
template<typename DataT>
void Nektar::LibUtilities::Points< DataT >::GetPoints ( Array< OneD, const DataType > &  x) const
inline

Definition at line 278 of file Points.h.

279  {
280  x = m_points[0];
281  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:349
template<typename DataT>
void Nektar::LibUtilities::Points< DataT >::GetPoints ( Array< OneD, const DataType > &  x,
Array< OneD, const DataType > &  y 
) const
inline

Definition at line 283 of file Points.h.

285  {
286  x = m_points[0];
287  y = m_points[1];
288  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:349
template<typename DataT>
void Nektar::LibUtilities::Points< DataT >::GetPoints ( Array< OneD, const DataType > &  x,
Array< OneD, const DataType > &  y,
Array< OneD, const DataType > &  z 
) const
inline

Definition at line 290 of file Points.h.

293  {
294  x = m_points[0];
295  y = m_points[1];
296  z = m_points[2];
297  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:349
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetPointsDim ( ) const
inline

Definition at line 241 of file Points.h.

Referenced by Nektar::LibUtilities::Points< NekDouble >::CalculatePoints().

242  {
243  return m_pointsKey.GetPointsDim();
244  }
unsigned int GetPointsDim() const
Definition: Points.h:149
template<typename DataT>
PointsType Nektar::LibUtilities::Points< DataT >::GetPointsType ( ) const
inline

Definition at line 256 of file Points.h.

257  {
258  return m_pointsKey.GetPointsType();
259  }
PointsType GetPointsType() const
Definition: Points.h:111
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetTotNumPoints ( ) const
inline
template<typename DataT>
const Array<OneD, const DataType>& Nektar::LibUtilities::Points< DataT >::GetW ( ) const
inline

Definition at line 266 of file Points.h.

267  {
268  return m_weights;
269  }
Array< OneD, DataType > m_weights
Definition: Points.h:350
template<typename DataT>
const Array<OneD, const DataType>& Nektar::LibUtilities::Points< DataT >::GetZ ( ) const
inline

Definition at line 261 of file Points.h.

262  {
263  return m_points[0];
264  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:349
template<typename DataT>
void Nektar::LibUtilities::Points< DataT >::GetZW ( Array< OneD, const DataType > &  z,
Array< OneD, const DataType > &  w 
) const
inline

Definition at line 271 of file Points.h.

273  {
274  z = m_points[0];
275  w = m_weights;
276  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:349
Array< OneD, DataType > m_weights
Definition: Points.h:350
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::Initialize ( void  )
inlinevirtual

Definition at line 234 of file Points.h.

235  {
236  CalculatePoints();
239  }
virtual void CalculatePoints()
Definition: Points.h:355
virtual void CalculateDerivMatrix()
Definition: Points.h:371
virtual void CalculateWeights()
Definition: Points.h:366

Member Data Documentation

template<typename DataT>
MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::m_derivmatrix[3]
protected

Definition at line 351 of file Points.h.

Referenced by Nektar::LibUtilities::Points< NekDouble >::GetD().

template<typename DataT>
NekManager<PointsKey, NekMatrix<DataType>, PointsKey::opLess> Nektar::LibUtilities::Points< DataT >::m_GalerkinProjectionManager
protected

Definition at line 353 of file Points.h.

template<typename DataT>
NekManager<PointsKey, NekMatrix<DataType>, PointsKey::opLess> Nektar::LibUtilities::Points< DataT >::m_InterpManager
protected

Definition at line 352 of file Points.h.

template<typename DataT>
Array<OneD, DataType> Nektar::LibUtilities::Points< DataT >::m_points[3]
protected
template<typename DataT>
PointsKey Nektar::LibUtilities::Points< DataT >::m_pointsKey
protected
template<typename DataT>
Array<OneD, DataType> Nektar::LibUtilities::Points< DataT >::m_weights
protected