Nektar++
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. More...
 
 PointsKey (const int &numpoints, const PointsType &pointstype, const NekDouble factor=NekConstants::kNekUnsetDouble)
 Constructor defining the number and distribution of points. More...
 
virtual ~PointsKey ()
 Destructor. More...
 
 PointsKey (const PointsKey &key)
 Copy constructor. More...
 
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) More...
 
PointsType m_pointstype
 Type of Points. More...
 
NekDouble m_factor
 optional factor More...
 

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.

70  :
71  m_numpoints(0),
74  {
75  }
NekDouble m_factor
optional factor
Definition: Points.h:210
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
static const NekDouble kNekUnsetDouble
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.

79  :
80  m_numpoints(numpoints),
81  m_pointstype(pointstype),
82  m_factor(factor)
83  {
84  }
NekDouble m_factor
optional factor
Definition: Points.h:210
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
virtual Nektar::LibUtilities::PointsKey::~PointsKey ( )
inlinevirtual

Destructor.

Definition at line 87 of file Points.h.

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

Copy constructor.

Definition at line 92 of file Points.h.

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

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().

117  {
118  return m_factor;
119  }
NekDouble m_factor
optional factor
Definition: Points.h:210
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::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), and Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal().

107  {
108  return m_numpoints;
109  }
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
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::NodalTriEvenlySpaced::GetI(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTriFekete::GetI(), Nektar::LibUtilities::Basis::GetI(), and Nektar::LibUtilities::Points< NekDouble >::GetPointsDim().

150  {
151  int dimpoints = 1;
152 
153  switch(m_pointstype)
154  {
155  case eNodalTriElec:
156  case eNodalTriFekete:
158  dimpoints = 2;
159  break;
160 
161  case eNodalTetElec:
164  dimpoints = 3;
165  break;
166 
167  default:
168  break;
169  }
170 
171  return dimpoints;
172  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:72
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:71
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:69
3D Evenly-spaced points on a Prism
Definition: PointsType.h:73
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:70
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:68
PointsType Nektar::LibUtilities::PointsKey::GetPointsType ( ) const
inline
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().

176  {
177  int totpoints = m_numpoints;
178 
179  switch(m_pointstype)
180  {
181  case eNodalTriElec:
182  case eNodalTriFekete:
184  totpoints = m_numpoints*(m_numpoints+1)/2;
185  break;
186 
187  case eNodalTetElec:
189  totpoints = m_numpoints*(m_numpoints+1)*(m_numpoints+2)/6;
190  break;
191 
193  totpoints = m_numpoints*m_numpoints*(m_numpoints+1)/2;
194  break;
195 
196  default:
197  break;
198  }
199 
200  return totpoints;
201  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:72
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:71
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:69
3D Evenly-spaced points on a Prism
Definition: PointsType.h:73
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:70
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:68
bool Nektar::LibUtilities::PointsKey::operator!= ( const PointsKey y)
inline

Definition at line 138 of file Points.h.

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

Definition at line 143 of file Points.h.

144  {
145  return (!(*this == *y));
146  }
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.

98  {
99  m_numpoints = key.m_numpoints;
100  m_pointstype = key.m_pointstype;
101  m_factor = key.m_factor;
102 
103  return *this;
104  }
NekDouble m_factor
optional factor
Definition: Points.h:210
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
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.

122  {
123 
124  if(fabs(m_factor - key.m_factor) < NekConstants::kNekZeroTol)
125  {
126  return (m_numpoints == key.m_numpoints &&
127  m_pointstype == key.m_pointstype);
128  }
129 
130  return false;
131  }
NekDouble m_factor
optional factor
Definition: Points.h:210
PointsType m_pointstype
Type of Points.
Definition: Points.h:209
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:208
static const NekDouble kNekZeroTol
bool Nektar::LibUtilities::PointsKey::operator== ( const PointsKey y)
inline

Definition at line 133 of file Points.h.

134  {
135  return (*this == *y);
136  }

Friends And Related Function Documentation

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

Definition at line 55 of file Points.cpp.

56  {
57  if (lhs.m_numpoints < rhs.m_numpoints)
58  {
59  return true;
60  }
61 
62  if (lhs.m_numpoints > rhs.m_numpoints)
63  {
64  return false;
65  }
66 
67  if (lhs.m_pointstype < rhs.m_pointstype)
68  {
69  return true;
70  }
71 
72  if (lhs.m_pointstype > rhs.m_pointstype)
73  {
74  return false;
75  }
76 
77  if(lhs.m_factor < rhs.m_factor)
78  {
79  return true;
80  }
81 
82  if(lhs.m_factor > rhs.m_factor)
83  {
84  return true;
85  }
86 
87  return false;
88  }
StandardMatrixTag & lhs
bool operator== ( const PointsKey lhs,
const PointsKey rhs 
)
friend

Definition at line 49 of file Points.cpp.

50  {
51  return (lhs.m_numpoints == rhs.m_numpoints &&
52  lhs.m_pointstype == rhs.m_pointstype);
53  }
StandardMatrixTag & lhs
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