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

Constructor & Destructor Documentation

◆ PointsKey() [1/3]

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

Default constructor.

Definition at line 71 of file Points.h.

71  :
72  m_numpoints(0),
75  {
76  }
NekDouble m_factor
optional factor
Definition: Points.h:236
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234
static const NekDouble kNekUnsetDouble

◆ PointsKey() [2/3]

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

80  :
81  m_numpoints(numpoints),
82  m_pointstype(pointstype),
83  m_factor(factor)
84  {
85  }
NekDouble m_factor
optional factor
Definition: Points.h:236
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234

◆ ~PointsKey()

virtual Nektar::LibUtilities::PointsKey::~PointsKey ( )
inlinevirtual

Destructor.

Definition at line 88 of file Points.h.

89  {
90  }

◆ PointsKey() [3/3]

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

Copy constructor.

Definition at line 93 of file Points.h.

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

Member Function Documentation

◆ GetFactor()

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

Definition at line 117 of file Points.h.

References m_factor.

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

118  {
119  return m_factor;
120  }
NekDouble m_factor
optional factor
Definition: Points.h:236

◆ GetNumPoints()

unsigned int Nektar::LibUtilities::PointsKey::GetNumPoints ( ) const
inline

Definition at line 107 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::FourierSingleModePoints::CreateMatrix(), Nektar::LibUtilities::BLPoints::CreateMatrix(), Nektar::LibUtilities::FourierPoints::CreateMatrix(), Nektar::LibUtilities::GaussPoints::CreateMatrix(), export_Points(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::Interp3D(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), Nektar::LibUtilities::operator<<(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::LibUtilities::PhysGalerkinProject3D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), and Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal().

108  {
109  return m_numpoints;
110  }
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234

◆ GetPointsDim()

unsigned int Nektar::LibUtilities::PointsKey::GetPointsDim ( ) const
inline

Definition at line 150 of file Points.h.

References Nektar::LibUtilities::eNodalHexElec, Nektar::LibUtilities::eNodalPrismElec, Nektar::LibUtilities::eNodalPrismEvenlySpaced, Nektar::LibUtilities::eNodalQuadElec, Nektar::LibUtilities::eNodalTetElec, Nektar::LibUtilities::eNodalTetEvenlySpaced, Nektar::LibUtilities::eNodalTriElec, Nektar::LibUtilities::eNodalTriEvenlySpaced, Nektar::LibUtilities::eNodalTriFekete, Nektar::LibUtilities::eNodalTriSPI, and m_pointstype.

Referenced by Nektar::LibUtilities::Points< NekDouble >::CalculateDerivMatrix(), Nektar::LibUtilities::Points< NekDouble >::CalculatePoints(), export_Points(), Nektar::LibUtilities::FourierSingleModePoints::GetI(), Nektar::LibUtilities::FourierPoints::GetI(), Nektar::LibUtilities::GaussPoints::GetI(), Nektar::LibUtilities::BLPoints::GetI(), Nektar::LibUtilities::NodalTetElec::GetI(), Nektar::LibUtilities::NodalTriElec::GetI(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::NodalPrismElec::GetI(), Nektar::LibUtilities::NodalTriEvenlySpaced::GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTriFekete::GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::GetI(), Nektar::LibUtilities::Basis::GetI(), Nektar::NekMeshUtils::Line::MakeOrder(), Nektar::NekMeshUtils::Tetrahedron::MakeOrder(), Nektar::NekMeshUtils::Quadrilateral::MakeOrder(), Nektar::NekMeshUtils::Prism::MakeOrder(), Nektar::NekMeshUtils::Triangle::MakeOrder(), Nektar::NekMeshUtils::Hexahedron::MakeOrder(), and Nektar::NekMeshUtils::Face::MakeOrder().

151  {
152  int dimpoints = 1;
153 
154  switch(m_pointstype)
155  {
156  case eNodalTriElec:
157  case eNodalTriFekete:
159  case eNodalTriSPI:
160  case eNodalQuadElec:
161  dimpoints = 2;
162  break;
163 
164  case eNodalTetElec:
167  case eNodalPrismElec:
168  case eNodalHexElec:
169  dimpoints = 3;
170  break;
171 
172  default:
173  break;
174  }
175 
176  return dimpoints;
177  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:73
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:72
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:70
3D Evenly-spaced points on a Prism
Definition: PointsType.h:74
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:71
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:69
3D electrostatically spaced points on a Prism
Definition: PointsType.h:75
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:76

◆ GetPointsType()

PointsType Nektar::LibUtilities::PointsKey::GetPointsType ( ) const
inline

Definition at line 112 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::LocalRegions::NodalTriExp::CreateStdMatrix(), export_Points(), Nektar::LocalRegions::NodalTriExp::FwdTrans(), Nektar::LibUtilities::BasisKey::GetPointsType(), Nektar::StdRegions::StdNodalPrismExp::ModalToNodal(), Nektar::StdRegions::StdNodalTetExp::ModalToNodal(), Nektar::StdRegions::StdNodalTriExp::ModalToNodal(), Nektar::StdRegions::StdNodalTetExp::NodalToModal(), Nektar::StdRegions::StdNodalPrismExp::NodalToModal(), Nektar::StdRegions::StdNodalTriExp::NodalToModal(), Nektar::StdRegions::StdNodalTetExp::NodalToModalTranspose(), Nektar::StdRegions::StdNodalPrismExp::NodalToModalTranspose(), Nektar::StdRegions::StdNodalTriExp::NodalToModalTranspose(), Nektar::LibUtilities::operator<<(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::StdRegions::StdNodalTetExp::v_FwdTrans(), Nektar::StdRegions::StdNodalPrismExp::v_FwdTrans(), Nektar::StdRegions::StdNodalTriExp::v_FwdTrans(), Nektar::LocalRegions::NodalTriExp::v_GetLinStdExp(), and Nektar::LocalRegions::NodalTriExp::v_GetStdExp().

113  {
114  return m_pointstype;
115  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:235

◆ GetTotNumPoints()

unsigned int Nektar::LibUtilities::PointsKey::GetTotNumPoints ( ) const
inline

Definition at line 180 of file Points.h.

References Nektar::ErrorUtil::efatal, Nektar::LibUtilities::eNodalHexElec, Nektar::LibUtilities::eNodalPrismElec, Nektar::LibUtilities::eNodalPrismEvenlySpaced, Nektar::LibUtilities::eNodalPrismSPI, Nektar::LibUtilities::eNodalQuadElec, Nektar::LibUtilities::eNodalTetElec, Nektar::LibUtilities::eNodalTetEvenlySpaced, Nektar::LibUtilities::eNodalTetSPI, Nektar::LibUtilities::eNodalTriElec, Nektar::LibUtilities::eNodalTriEvenlySpaced, Nektar::LibUtilities::eNodalTriFekete, Nektar::LibUtilities::eNodalTriSPI, Nektar::lhs, LIB_UTILITIES_EXPORT, m_numpoints, m_pointstype, NEKERROR, Nektar::LibUtilities::PointsKey::opLess::operator()(), operator<, operator==(), and Nektar::rhs.

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

181  {
182  int totpoints = m_numpoints;
183 
184  switch(m_pointstype)
185  {
186  case eNodalTriElec:
187  case eNodalTriFekete:
189  totpoints = m_numpoints*(m_numpoints+1)/2;
190  break;
191  case eNodalTriSPI:
193  "This method cannot be implemented");
194  break;
195 
196  case eNodalQuadElec:
197  totpoints = m_numpoints*m_numpoints;
198  break;
199 
200  case eNodalTetElec:
202  totpoints = m_numpoints*(m_numpoints+1)*(m_numpoints+2)/6;
203  break;
204  case eNodalTetSPI:
206  "This method cannot be implemented");
207  break;
208 
210  case eNodalPrismElec:
211  totpoints = m_numpoints*m_numpoints*(m_numpoints+1)/2;
212  break;
213  case eNodalPrismSPI:
215  "This method cannot be implemented");
216  break;
217 
218  case eNodalHexElec:
219  totpoints = m_numpoints*m_numpoints*m_numpoints;
220  break;
221 
222  default:
223  break;
224  }
225 
226  return totpoints;
227  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
Definition: PointsType.h:77
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:73
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:72
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:70
3D Evenly-spaced points on a Prism
Definition: PointsType.h:74
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:71
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:69
3D electrostatically spaced points on a Prism
Definition: PointsType.h:75
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:76

◆ operator!=() [1/2]

bool Nektar::LibUtilities::PointsKey::operator!= ( const PointsKey y)
inline

Definition at line 139 of file Points.h.

140  {
141  return (!(*this == y));
142  }

◆ operator!=() [2/2]

bool Nektar::LibUtilities::PointsKey::operator!= ( const PointsKey y)
inline

Definition at line 144 of file Points.h.

145  {
146  return (!(*this == *y));
147  }

◆ operator=()

PointsKey& Nektar::LibUtilities::PointsKey::operator= ( const PointsKey key)
inline

Definition at line 98 of file Points.h.

References m_factor, m_numpoints, and m_pointstype.

99  {
100  m_numpoints = key.m_numpoints;
101  m_pointstype = key.m_pointstype;
102  m_factor = key.m_factor;
103 
104  return *this;
105  }
NekDouble m_factor
optional factor
Definition: Points.h:236
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234

◆ operator==() [1/2]

bool Nektar::LibUtilities::PointsKey::operator== ( const PointsKey key)
inline

Definition at line 122 of file Points.h.

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

Referenced by GetTotNumPoints().

123  {
124 
125  if(fabs(m_factor - key.m_factor) < NekConstants::kNekZeroTol)
126  {
127  return (m_numpoints == key.m_numpoints &&
128  m_pointstype == key.m_pointstype);
129  }
130 
131  return false;
132  }
NekDouble m_factor
optional factor
Definition: Points.h:236
PointsType m_pointstype
Type of Points.
Definition: Points.h:235
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:234
static const NekDouble kNekZeroTol

◆ operator==() [2/2]

bool Nektar::LibUtilities::PointsKey::operator== ( const PointsKey y)
inline

Definition at line 134 of file Points.h.

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

Friends And Related Function Documentation

◆ operator<

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

Definition at line 54 of file Foundations/Points.cpp.

Referenced by GetTotNumPoints().

55  {
56  if (lhs.m_pointstype < rhs.m_pointstype)
57  {
58  return true;
59  }
60 
61  if (lhs.m_pointstype > rhs.m_pointstype)
62  {
63  return false;
64  }
65 
66  if (lhs.m_numpoints < rhs.m_numpoints)
67  {
68  return true;
69  }
70 
71  if (lhs.m_numpoints > rhs.m_numpoints)
72  {
73  return false;
74  }
75 
76  if(lhs.m_factor < rhs.m_factor)
77  {
78  return true;
79  }
80 
81  if(lhs.m_factor > rhs.m_factor)
82  {
83  return true;
84  }
85 
86  return false;
87  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator==

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

Definition at line 48 of file Foundations/Points.cpp.

49  {
50  return (lhs.m_numpoints == rhs.m_numpoints &&
51  lhs.m_pointstype == rhs.m_pointstype);
52  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ opLess::operator()

bool opLess::operator() ( const PointsKey lhs,
const PointsKey rhs 
) const
friend

Member Data Documentation

◆ m_factor

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

optional factor

Definition at line 236 of file Points.h.

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

◆ m_numpoints

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

number of the points (as appropriately defined for PointsType)

Definition at line 234 of file Points.h.

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

◆ m_pointstype

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