Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 70 of file FoundationsFwd.hpp.

Member Typedef Documentation

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

Definition at line 249 of file Points.h.

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

Definition at line 250 of file Points.h.

Constructor & Destructor Documentation

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

Definition at line 252 of file Points.h.

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

Definition at line 402 of file Points.h.

402  :m_pointsKey(key)
403  {
404  }
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( const Points< DataT > &  pts)
inlineprivate

Definition at line 408 of file Points.h.

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

Definition at line 412 of file Points.h.

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

Member Function Documentation

template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculateDerivMatrix ( )
inlineprotectedvirtual

Reimplemented in Nektar::LibUtilities::GaussPoints, Nektar::LibUtilities::BLPoints, Nektar::LibUtilities::FourierSingleModePoints, Nektar::LibUtilities::FourierPoints, Nektar::LibUtilities::NodalPrismEvenlySpaced, Nektar::LibUtilities::NodalTetEvenlySpaced, Nektar::LibUtilities::NodalTetElec, Nektar::LibUtilities::NodalPrismElec, Nektar::LibUtilities::NodalTriEvenlySpaced, Nektar::LibUtilities::NodalTriFekete, Nektar::LibUtilities::NodalTriElec, Nektar::LibUtilities::PolyEPoints, Nektar::LibUtilities::NodalHexElec, Nektar::LibUtilities::NodalQuadElec, Nektar::LibUtilities::NodalPrismSPI, Nektar::LibUtilities::NodalTetSPI, and Nektar::LibUtilities::NodalTriSPI.

Definition at line 393 of file Points.h.

Referenced by Nektar::LibUtilities::FourierPoints::CalculateDerivMatrix(), Nektar::LibUtilities::FourierSingleModePoints::CalculateDerivMatrix(), Nektar::LibUtilities::BLPoints::CalculateDerivMatrix(), and Nektar::LibUtilities::Points< NekDouble >::Initialize().

394  {
395  int totNumPoints = GetTotNumPoints();
396  for(unsigned int i = 0; i < m_pointsKey.GetPointsDim(); ++i)
397  {
398  m_derivmatrix[i] = MemoryManager<NekMatrix<DataType> >::AllocateSharedPtr(totNumPoints,totNumPoints);
399  }
400  }
MatrixSharedPtrType m_derivmatrix[3]
Definition: Points.h:373
unsigned int GetPointsDim() const
Definition: Points.h:149
unsigned int GetTotNumPoints() const
Definition: Points.h:273
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 321 of file Points.h.

322  {
323  return m_derivmatrix[(int)dir];
324  }
MatrixSharedPtrType m_derivmatrix[3]
Definition: Points.h:373
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetGalerkinProjection ( const PointsKey pkey)
inlinevirtual

Reimplemented in Nektar::LibUtilities::GaussPoints.

Definition at line 362 of file Points.h.

363  {
364  ASSERTL0(false, "Method not implemented ");
365  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
366  return returnval;
367  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
template<typename DataT>
virtual const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const PointsKey pkey)
inlinevirtual
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 333 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:198
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 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:198
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 347 of file Points.h.

348  {
349  ASSERTL0(false, "Method not implemented");
350  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
351  return returnval;
352  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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, Nektar::LibUtilities::NodalPrismElec, and Nektar::LibUtilities::NodalTetElec.

Definition at line 354 of file Points.h.

356  {
357  ASSERTL0(false, "Method not implemented");
358  boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
359  return returnval;
360  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetNumPoints ( ) const
inline

Definition at line 268 of file Points.h.

269  {
270  return m_pointsKey.GetNumPoints();
271  }
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 300 of file Points.h.

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

Definition at line 305 of file Points.h.

307  {
308  x = m_points[0];
309  y = m_points[1];
310  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:371
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 312 of file Points.h.

315  {
316  x = m_points[0];
317  y = m_points[1];
318  z = m_points[2];
319  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:371
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetPointsDim ( ) const
inline

Definition at line 263 of file Points.h.

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

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

Definition at line 278 of file Points.h.

279  {
280  return m_pointsKey.GetPointsType();
281  }
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 288 of file Points.h.

289  {
290  return m_weights;
291  }
Array< OneD, DataType > m_weights
Definition: Points.h:372
template<typename DataT>
const Array<OneD, const DataType>& Nektar::LibUtilities::Points< DataT >::GetZ ( ) const
inline

Definition at line 283 of file Points.h.

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

Definition at line 293 of file Points.h.

295  {
296  z = m_points[0];
297  w = m_weights;
298  }
Array< OneD, DataType > m_points[3]
Definition: Points.h:371
Array< OneD, DataType > m_weights
Definition: Points.h:372
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::Initialize ( void  )
inlinevirtual

Definition at line 256 of file Points.h.

257  {
258  CalculatePoints();
261  }
virtual void CalculatePoints()
Definition: Points.h:377
virtual void CalculateDerivMatrix()
Definition: Points.h:393
virtual void CalculateWeights()
Definition: Points.h:388

Member Data Documentation

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

Definition at line 373 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 375 of file Points.h.

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

Definition at line 374 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