Nektar++
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | 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 <Points.h>

Public Types

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

Public Member Functions

virtual ~Points ()
 
void Initialize (void)
 
size_t GetPointsDim () const
 
size_t GetNumPoints () const
 
size_t 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
 
const Array< OneD, const NekDouble > & GetBaryWeights () 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
 
const MatrixSharedPtrType GetI (const PointsKey &key)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (size_t uint, const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
 
const MatrixSharedPtrType GetGalerkinProjection (const PointsKey &pkey)
 

Protected Member Functions

virtual void v_Initialize (void)
 
virtual void v_CalculatePoints ()
 
virtual void v_CalculateWeights ()
 

Protected Attributes

PointsKey m_pointsKey
 Points type for this points distributions. More...
 
Array< OneD, DataTypem_points [3]
 Storage for the point locations, allowing for up to a 3D points storage. More...
 
Array< OneD, DataTypem_weights
 Quadrature weights for the weights. More...
 
Array< OneD, DataTypem_bcweights
 Barycentric weights. More...
 
MatrixSharedPtrType m_derivmatrix [3]
 Derivative matrices. More...
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_InterpManager
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_GalerkinProjectionManager
 

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 234 of file Points.h.

Member Typedef Documentation

◆ DataType

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

Definition at line 237 of file Points.h.

◆ MatrixSharedPtrType

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

Definition at line 238 of file Points.h.

Constructor & Destructor Documentation

◆ ~Points()

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

Definition at line 240 of file Points.h.

241 {
242 }

Member Function Documentation

◆ GetBaryWeights()

template<typename DataT >
const Array< OneD, const NekDouble > & Nektar::LibUtilities::Points< DataT >::GetBaryWeights ( ) const
inline

Definition at line 286 of file Points.h.

287 {
288 return m_bcweights;
289 }
Array< OneD, DataType > m_bcweights
Barycentric weights.
Definition: Points.h:360

References Nektar::LibUtilities::Points< DataT >::m_bcweights.

◆ GetD()

template<typename DataT >
const MatrixSharedPtrType & Nektar::LibUtilities::Points< DataT >::GetD ( Direction  dir = xDir) const
inline

Definition at line 312 of file Points.h.

313 {
314 return m_derivmatrix[(int)dir];
315 }
MatrixSharedPtrType m_derivmatrix[3]
Derivative matrices.
Definition: Points.h:362

References Nektar::LibUtilities::Points< DataT >::m_derivmatrix.

◆ GetGalerkinProjection()

template<typename DataT >
const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetGalerkinProjection ( const PointsKey pkey)
inline

Definition at line 346 of file Points.h.

347 {
348 return v_GetGalerkinProjection(pkey);
349 }

◆ GetI() [1/5]

template<typename DataT >
const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const Array< OneD, const DataType > &  x)
inline

Definition at line 322 of file Points.h.

323 {
324 return v_GetI(x);
325 }

◆ GetI() [2/5]

template<typename DataT >
const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const Array< OneD, const DataType > &  x,
const Array< OneD, const DataType > &  y 
)
inline

Definition at line 333 of file Points.h.

335 {
336 return v_GetI(x, y);
337 }

◆ GetI() [3/5]

template<typename DataT >
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 
)
inline

Definition at line 339 of file Points.h.

342 {
343 return v_GetI(x, y, z);
344 }
std::vector< double > z(NPUPPER)

References Nektar::UnitTests::z().

◆ GetI() [4/5]

template<typename DataT >
const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( const PointsKey key)
inline

Definition at line 317 of file Points.h.

318 {
319 return v_GetI(key);
320 }

◆ GetI() [5/5]

template<typename DataT >
const MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::GetI ( size_t  uint,
const Array< OneD, const DataType > &  x 
)
inline

Definition at line 327 of file Points.h.

329 {
330 return v_GetI(uint, x);
331 }

◆ GetNumPoints()

template<typename DataT >
size_t Nektar::LibUtilities::Points< DataT >::GetNumPoints ( ) const
inline

Definition at line 254 of file Points.h.

255 {
256 return m_pointsKey.GetNumPoints();
257 }
PointsKey m_pointsKey
Points type for this points distributions.
Definition: Points.h:353
size_t GetNumPoints() const
Definition: Points.h:85

References Nektar::LibUtilities::PointsKey::GetNumPoints(), and Nektar::LibUtilities::Points< DataT >::m_pointsKey.

◆ GetPoints() [1/3]

template<typename DataT >
void Nektar::LibUtilities::Points< DataT >::GetPoints ( Array< OneD, const DataType > &  x) const
inline

Definition at line 291 of file Points.h.

292 {
293 x = m_points[0];
294 }
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
Definition: Points.h:356

References Nektar::LibUtilities::Points< DataT >::m_points.

◆ GetPoints() [2/3]

template<typename DataT >
void Nektar::LibUtilities::Points< DataT >::GetPoints ( Array< OneD, const DataType > &  x,
Array< OneD, const DataType > &  y 
) const
inline

Definition at line 296 of file Points.h.

298 {
299 x = m_points[0];
300 y = m_points[1];
301 }

References Nektar::LibUtilities::Points< DataT >::m_points.

◆ GetPoints() [3/3]

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 303 of file Points.h.

306 {
307 x = m_points[0];
308 y = m_points[1];
309 z = m_points[2];
310 }

References Nektar::LibUtilities::Points< DataT >::m_points, and Nektar::UnitTests::z().

◆ GetPointsDim()

template<typename DataT >
size_t Nektar::LibUtilities::Points< DataT >::GetPointsDim ( ) const
inline

◆ GetPointsType()

template<typename DataT >
PointsType Nektar::LibUtilities::Points< DataT >::GetPointsType ( ) const
inline

◆ GetTotNumPoints()

template<typename DataT >
size_t Nektar::LibUtilities::Points< DataT >::GetTotNumPoints ( ) const
inline

◆ GetW()

template<typename DataT >
const Array< OneD, const DataType > & Nektar::LibUtilities::Points< DataT >::GetW ( ) const
inline

Definition at line 274 of file Points.h.

275 {
276 return m_weights;
277 }
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
Definition: Points.h:358

References Nektar::LibUtilities::Points< DataT >::m_weights.

◆ GetZ()

template<typename DataT >
const Array< OneD, const DataType > & Nektar::LibUtilities::Points< DataT >::GetZ ( ) const
inline

Definition at line 269 of file Points.h.

270 {
271 return m_points[0];
272 }

References Nektar::LibUtilities::Points< DataT >::m_points.

◆ GetZW()

template<typename DataT >
void Nektar::LibUtilities::Points< DataT >::GetZW ( Array< OneD, const DataType > &  z,
Array< OneD, const DataType > &  w 
) const
inline

◆ Initialize()

template<typename DataT >
void Nektar::LibUtilities::Points< DataT >::Initialize ( void  )
inline

Definition at line 244 of file Points.h.

245 {
246 v_Initialize();
247 }
virtual void v_Initialize(void)
Definition: Points.h:368

References Nektar::LibUtilities::Points< DataT >::v_Initialize().

◆ v_CalculatePoints()

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

◆ v_CalculateWeights()

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

◆ v_Initialize()

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

Definition at line 368 of file Points.h.

369 {
372 v_CalculateBaryWeights();
373 v_CalculateDerivMatrix();
374 }
virtual void v_CalculatePoints()
Definition: Points.h:376
virtual void v_CalculateWeights()
Definition: Points.h:387

References Nektar::LibUtilities::Points< DataT >::v_CalculatePoints(), and Nektar::LibUtilities::Points< DataT >::v_CalculateWeights().

Referenced by Nektar::LibUtilities::Points< DataT >::Initialize().

Member Data Documentation

◆ m_bcweights

template<typename DataT >
Array<OneD, DataType> Nektar::LibUtilities::Points< DataT >::m_bcweights
protected

Barycentric weights.

Definition at line 360 of file Points.h.

Referenced by Nektar::LibUtilities::Points< DataT >::GetBaryWeights().

◆ m_derivmatrix

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

Derivative matrices.

Definition at line 362 of file Points.h.

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

◆ m_GalerkinProjectionManager

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

Definition at line 366 of file Points.h.

◆ m_InterpManager

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

Definition at line 364 of file Points.h.

◆ m_points

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

◆ m_pointsKey

template<typename DataT >
PointsKey Nektar::LibUtilities::Points< DataT >::m_pointsKey
protected

◆ m_weights

template<typename DataT >
Array<OneD, DataType> Nektar::LibUtilities::Points< DataT >::m_weights
protected