Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
Nektar::LibUtilities::PointsKey Class Reference

Defines a specification for a set of points. More...

#include <Points.h>

Classes

struct  opLess

Public Member Functions

 PointsKey (void)
 Default constructor.
 PointsKey (const int &numpoints, const PointsType &pointstype, const NekDouble factor=NekConstants::kNekUnsetDouble)
 Constructor defining the number and distribution of points.
virtual ~PointsKey ()
 Destructor.
 PointsKey (const PointsKey &key)
 Copy constructor.
PointsKeyoperator= (const PointsKey &key)
unsigned int GetNumPoints () const
PointsType GetPointsType () const
NekDouble GetFactor () const
bool operator== (const PointsKey &key)
bool operator== (const PointsKey *y)
bool operator!= (const PointsKey &y)
bool operator!= (const PointsKey *y)
unsigned int GetPointsDim () const
unsigned int GetTotNumPoints () const

Protected Attributes

unsigned int m_numpoints
 number of the points (as appropriately defined for PointsType)
PointsType m_pointstype
 Type of Points.
NekDouble m_factor
 optional factor

Friends

bool operator== (const PointsKey &lhs, const PointsKey &rhs)
bool operator< (const PointsKey &lhs, const PointsKey &rhs)
bool opLess::operator() (const PointsKey &lhs, const PointsKey &rhs) const

Detailed Description

Defines a specification for a set of points.

Specification for a set of points. This includes the total number of points, as well as their distribution.

Definition at line 58 of file Points.h.

Constructor & Destructor Documentation

Nektar::LibUtilities::PointsKey::PointsKey ( void  )
inline

Default constructor.

Definition at line 70 of file Points.h.

Nektar::LibUtilities::PointsKey::PointsKey ( const int &  numpoints,
const PointsType pointstype,
const NekDouble  factor = NekConstants::kNekUnsetDouble 
)
inline

Constructor defining the number and distribution of points.

Definition at line 78 of file Points.h.

:
m_numpoints(numpoints),
m_pointstype(pointstype),
m_factor(factor)
{
}
virtual Nektar::LibUtilities::PointsKey::~PointsKey ( )
inlinevirtual

Destructor.

Definition at line 87 of file Points.h.

{
}
Nektar::LibUtilities::PointsKey::PointsKey ( const PointsKey key)
inline

Copy constructor.

Definition at line 92 of file Points.h.

{
*this = key; // defer to assignment operator
}

Member Function Documentation

NekDouble Nektar::LibUtilities::PointsKey::GetFactor ( ) const
inline

Definition at line 116 of file Points.h.

References m_factor.

Referenced by Nektar::LibUtilities::BLPoints::CalculatePoints().

{
return m_factor;
}
unsigned int Nektar::LibUtilities::PointsKey::GetNumPoints ( ) const
inline

Definition at line 106 of file Points.h.

References m_numpoints.

Referenced by Nektar::LibUtilities::PolyEPoints::CalculateDerivMatrix(), Nektar::LibUtilities::FourierPoints::CalculateDerivMatrix(), Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::LibUtilities::PolyEPoints::CalculateInterpMatrix(), Nektar::LibUtilities::FourierPoints::CalculateInterpMatrix(), Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), Nektar::LibUtilities::PolyEPoints::CalculatePoints(), Nektar::LibUtilities::FourierPoints::CalculatePoints(), Nektar::LibUtilities::FourierSingleModePoints::CalculatePoints(), Nektar::LibUtilities::BLPoints::CalculatePoints(), Nektar::LibUtilities::GaussPoints::CalculatePoints(), Nektar::LibUtilities::PolyEPoints::CalculateWeights(), Nektar::LibUtilities::FourierPoints::CalculateWeights(), Nektar::LibUtilities::FourierSingleModePoints::CalculateWeights(), Nektar::LibUtilities::BLPoints::CreateMatrix(), Nektar::LibUtilities::FourierSingleModePoints::CreateMatrix(), Nektar::LibUtilities::FourierPoints::CreateMatrix(), Nektar::LibUtilities::GaussPoints::CreateMatrix(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::Points< NekDouble >::GetNumPoints(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::Interp3D(), Nektar::LibUtilities::operator<<(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::LibUtilities::PhysGalerkinProject3D(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), and Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal().

{
return m_numpoints;
}
unsigned int Nektar::LibUtilities::PointsKey::GetPointsDim ( ) const
inline

Definition at line 149 of file Points.h.

References Nektar::LibUtilities::eNodalPrismEvenlySpaced, Nektar::LibUtilities::eNodalTetElec, Nektar::LibUtilities::eNodalTetEvenlySpaced, Nektar::LibUtilities::eNodalTriElec, Nektar::LibUtilities::eNodalTriEvenlySpaced, Nektar::LibUtilities::eNodalTriFekete, and m_pointstype.

Referenced by Nektar::LibUtilities::Points< NekDouble >::CalculateDerivMatrix(), Nektar::LibUtilities::BLPoints::GetI(), Nektar::LibUtilities::FourierSingleModePoints::GetI(), Nektar::LibUtilities::GaussPoints::GetI(), Nektar::LibUtilities::FourierPoints::GetI(), Nektar::LibUtilities::NodalTriElec::GetI(), Nektar::LibUtilities::NodalTetElec::GetI(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::NodalTriEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTriFekete::GetI(), Nektar::LibUtilities::Basis::GetI(), and Nektar::LibUtilities::Points< NekDouble >::GetPointsDim().

{
int dimpoints = 1;
switch(m_pointstype)
{
dimpoints = 2;
break;
dimpoints = 3;
break;
default:
break;
}
return dimpoints;
}
PointsType Nektar::LibUtilities::PointsKey::GetPointsType ( ) const
inline

Definition at line 111 of file Points.h.

References m_pointstype.

Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), Nektar::LibUtilities::BLPoints::CalculatePoints(), Nektar::LibUtilities::GaussPoints::CalculatePoints(), Nektar::LibUtilities::BasisKey::GetPointsType(), Nektar::LibUtilities::Points< NekDouble >::GetPointsType(), and Nektar::LibUtilities::operator<<().

{
return m_pointstype;
}
unsigned int Nektar::LibUtilities::PointsKey::GetTotNumPoints ( ) const
inline

Definition at line 175 of file Points.h.

References Nektar::LibUtilities::eNodalPrismEvenlySpaced, Nektar::LibUtilities::eNodalTetElec, Nektar::LibUtilities::eNodalTetEvenlySpaced, Nektar::LibUtilities::eNodalTriElec, Nektar::LibUtilities::eNodalTriEvenlySpaced, Nektar::LibUtilities::eNodalTriFekete, m_numpoints, and m_pointstype.

Referenced by Nektar::LibUtilities::GaussPoints::CalculateDerivMatrix(), Nektar::LibUtilities::NodalTriElec::CalculatePoints(), Nektar::LibUtilities::NodalTetElec::CalculatePoints(), Nektar::LibUtilities::NodalTriFekete::CalculatePoints(), Nektar::LibUtilities::BasisKey::GetTotNumPoints(), and Nektar::LibUtilities::Points< NekDouble >::GetTotNumPoints().

{
int totpoints = m_numpoints;
switch(m_pointstype)
{
totpoints = m_numpoints*(m_numpoints+1)/2;
break;
totpoints = m_numpoints*(m_numpoints+1)*(m_numpoints+2)/6;
break;
totpoints = m_numpoints*m_numpoints*(m_numpoints+1)/2;
break;
default:
break;
}
return totpoints;
}
bool Nektar::LibUtilities::PointsKey::operator!= ( const PointsKey y)
inline

Definition at line 138 of file Points.h.

{
return (!(*this == y));
}
bool Nektar::LibUtilities::PointsKey::operator!= ( const PointsKey y)
inline

Definition at line 143 of file Points.h.

{
return (!(*this == *y));
}
PointsKey& Nektar::LibUtilities::PointsKey::operator= ( const PointsKey key)
inline

Definition at line 97 of file Points.h.

References m_factor, m_numpoints, and m_pointstype.

{
m_numpoints = key.m_numpoints;
m_pointstype = key.m_pointstype;
m_factor = key.m_factor;
return *this;
}
bool Nektar::LibUtilities::PointsKey::operator== ( const PointsKey key)
inline

Definition at line 121 of file Points.h.

References Nektar::NekConstants::kNekZeroTol, m_factor, m_numpoints, and m_pointstype.

{
if(fabs(m_factor - key.m_factor) < NekConstants::kNekZeroTol)
{
return (m_numpoints == key.m_numpoints &&
m_pointstype == key.m_pointstype);
}
return false;
}
bool Nektar::LibUtilities::PointsKey::operator== ( const PointsKey y)
inline

Definition at line 133 of file Points.h.

{
return (*this == *y);
}

Friends And Related Function Documentation

bool operator< ( const PointsKey lhs,
const PointsKey rhs 
)
friend

Definition at line 55 of file Points.cpp.

{
if (lhs.m_numpoints < rhs.m_numpoints)
{
return true;
}
if (lhs.m_numpoints > rhs.m_numpoints)
{
return false;
}
if (lhs.m_pointstype < rhs.m_pointstype)
{
return true;
}
if (lhs.m_pointstype > rhs.m_pointstype)
{
return false;
}
if(lhs.m_factor < rhs.m_factor)
{
return true;
}
if(lhs.m_factor > rhs.m_factor)
{
return true;
}
return false;
}
bool operator== ( const PointsKey lhs,
const PointsKey rhs 
)
friend

Definition at line 49 of file Points.cpp.

{
return (lhs.m_numpoints == rhs.m_numpoints &&
lhs.m_pointstype == rhs.m_pointstype);
}
bool opLess::operator() ( const PointsKey lhs,
const PointsKey rhs 
) const
friend

Member Data Documentation

NekDouble Nektar::LibUtilities::PointsKey::m_factor
protected

optional factor

Definition at line 210 of file Points.h.

Referenced by GetFactor(), Nektar::LibUtilities::operator<(), operator=(), and operator==().

unsigned int Nektar::LibUtilities::PointsKey::m_numpoints
protected

number of the points (as appropriately defined for PointsType)

Definition at line 208 of file Points.h.

Referenced by GetNumPoints(), GetTotNumPoints(), Nektar::LibUtilities::operator<(), operator=(), Nektar::LibUtilities::operator==(), and operator==().

PointsType Nektar::LibUtilities::PointsKey::m_pointstype
protected

Type of Points.

Definition at line 209 of file Points.h.

Referenced by GetPointsDim(), GetPointsType(), GetTotNumPoints(), Nektar::LibUtilities::PointsKey::opLess::operator()(), Nektar::LibUtilities::operator<(), operator=(), Nektar::LibUtilities::operator==(), and operator==().