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 <Points.h>

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

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.

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

Definition at line 379 of file Points.h.

{
}
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( const Points< DataT > &  pts)
inlineprivate

Definition at line 385 of file Points.h.

{
NEKERROR(ErrorUtil::efatal,"Copy Constructor for Points should not be called");
}
template<typename DataT>
Nektar::LibUtilities::Points< DataT >::Points ( )
inlineprivate

Definition at line 389 of file Points.h.

{
NEKERROR(ErrorUtil::efatal,"Default Constructor for Points should not be called");
}

Member Function Documentation

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

Definition at line 371 of file Points.h.

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

{
int totNumPoints = GetTotNumPoints();
for(unsigned int i = 0; i < m_pointsKey.GetPointsDim(); ++i)
{
m_derivmatrix[i] = MemoryManager<NekMatrix<DataType> >::AllocateSharedPtr(totNumPoints,totNumPoints);
}
}
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculatePoints ( )
inlineprotectedvirtual

Definition at line 355 of file Points.h.

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

{
unsigned int pointsDim = GetPointsDim();
unsigned int totNumPoints = GetTotNumPoints();
for (unsigned int i=0; i<pointsDim; ++i)
{
m_points[i] = Array<OneD, DataType>(totNumPoints);
}
}
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::CalculateWeights ( )
inlineprotectedvirtual

Definition at line 366 of file Points.h.

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

{
m_weights = Array<OneD, DataType>(GetTotNumPoints());
}
template<typename DataT>
const MatrixSharedPtrType& Nektar::LibUtilities::Points< DataT >::GetD ( Direction  dir = xDir) const
inline

Definition at line 299 of file Points.h.

{
return m_derivmatrix[(int)dir];
}
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.

{
ASSERTL0(false, "Method not implemented ");
boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
return returnval;
}
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 311 of file Points.h.

{
ASSERTL0(false, "Method not implemented");
boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
return returnval;
}
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.

{
ASSERTL0(false, "Method not implemented");
boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
return returnval;
}
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.

{
ASSERTL0(false, "Method not implemented");
boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
return returnval;
}
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.

{
ASSERTL0(false, "Method not implemented");
boost::shared_ptr<NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr());
return returnval;
}
template<typename DataT>
unsigned int Nektar::LibUtilities::Points< DataT >::GetNumPoints ( ) const
inline

Definition at line 246 of file Points.h.

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

Definition at line 278 of file Points.h.

{
x = m_points[0];
}
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.

{
x = m_points[0];
y = m_points[1];
}
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.

{
x = m_points[0];
y = m_points[1];
z = m_points[2];
}
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().

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

Definition at line 256 of file Points.h.

{
}
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.

{
return m_weights;
}
template<typename DataT>
const Array<OneD, const DataType>& Nektar::LibUtilities::Points< DataT >::GetZ ( ) const
inline

Definition at line 261 of file Points.h.

{
return m_points[0];
}
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.

{
z = m_points[0];
w = m_weights;
}
template<typename DataT>
virtual void Nektar::LibUtilities::Points< DataT >::Initialize ( void  )
inlinevirtual

Definition at line 234 of file Points.h.

Member Data Documentation

template<typename DataT>
MatrixSharedPtrType Nektar::LibUtilities::Points< DataT >::m_derivmatrix[3]
protected
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