Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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. 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:232
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
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:232
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
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:232
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::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().

107  {
108  return m_numpoints;
109  }
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
unsigned int Nektar::LibUtilities::PointsKey::GetPointsDim ( ) const
inline

Definition at line 149 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::BLPoints::GetI(), Nektar::LibUtilities::FourierPoints::GetI(), Nektar::LibUtilities::FourierSingleModePoints::GetI(), Nektar::LibUtilities::GaussPoints::GetI(), Nektar::LibUtilities::NodalTetElec::GetI(), Nektar::LibUtilities::NodalTriElec::GetI(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::NodalPrismElec::GetI(), Nektar::LibUtilities::NodalTriEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTriFekete::GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::GetI(), Nektar::LibUtilities::Basis::GetI(), Nektar::LibUtilities::Points< NekDouble >::GetPointsDim(), Nektar::NekMeshUtils::Line::MakeOrder(), Nektar::NekMeshUtils::Quadrilateral::MakeOrder(), Nektar::NekMeshUtils::Prism::MakeOrder(), Nektar::NekMeshUtils::Tetrahedron::MakeOrder(), Nektar::NekMeshUtils::Triangle::MakeOrder(), Nektar::NekMeshUtils::Hexahedron::MakeOrder(), and Nektar::NekMeshUtils::Face::MakeOrder().

150  {
151  int dimpoints = 1;
152 
153  switch(m_pointstype)
154  {
155  case eNodalTriElec:
156  case eNodalTriFekete:
158  case eNodalTriSPI:
159  case eNodalQuadElec:
160  dimpoints = 2;
161  break;
162 
163  case eNodalTetElec:
166  case eNodalPrismElec:
167  case eNodalHexElec:
168  dimpoints = 3;
169  break;
170 
171  default:
172  break;
173  }
174 
175  return dimpoints;
176  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:74
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:73
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:71
3D Evenly-spaced points on a Prism
Definition: PointsType.h:75
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:72
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:70
3D electrostatically spaced points on a Prism
Definition: PointsType.h:76
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:77
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::LocalRegions::NodalTriExp::CreateStdMatrix(), Nektar::LocalRegions::NodalTriExp::FwdTrans(), Nektar::LibUtilities::BasisKey::GetPointsType(), Nektar::LibUtilities::Points< NekDouble >::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().

112  {
113  return m_pointstype;
114  }
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int Nektar::LibUtilities::PointsKey::GetTotNumPoints ( ) const
inline

Definition at line 179 of file Points.h.

References ASSERTL0, 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, m_numpoints, and m_pointstype.

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

180  {
181  int totpoints = m_numpoints;
182 
183  switch(m_pointstype)
184  {
185  case eNodalTriElec:
186  case eNodalTriFekete:
188  totpoints = m_numpoints*(m_numpoints+1)/2;
189  break;
190  case eNodalTriSPI:
191  ASSERTL0(false,"this method cannot be implemented");
192  break;
193 
194  case eNodalQuadElec:
195  totpoints = m_numpoints*m_numpoints;
196  break;
197 
198  case eNodalTetElec:
200  totpoints = m_numpoints*(m_numpoints+1)*(m_numpoints+2)/6;
201  break;
202  case eNodalTetSPI:
203  ASSERTL0(false,"this method cannot be implemented");
204  break;
205 
207  case eNodalPrismElec:
208  totpoints = m_numpoints*m_numpoints*(m_numpoints+1)/2;
209  break;
210  case eNodalPrismSPI:
211  ASSERTL0(false,"this method cannot be implemented");
212  break;
213 
214  case eNodalHexElec:
215  totpoints = m_numpoints*m_numpoints*m_numpoints;
216  break;
217 
218  default:
219  break;
220  }
221 
222  return totpoints;
223  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
Definition: PointsType.h:78
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:74
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:73
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:71
3D Evenly-spaced points on a Prism
Definition: PointsType.h:75
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:72
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:70
3D electrostatically spaced points on a Prism
Definition: PointsType.h:76
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:77
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:232
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
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:232
PointsType m_pointstype
Type of Points.
Definition: Points.h:231
unsigned int m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:230
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_pointstype < rhs.m_pointstype)
58  {
59  return true;
60  }
61 
62  if (lhs.m_pointstype > rhs.m_pointstype)
63  {
64  return false;
65  }
66 
67  if (lhs.m_numpoints < rhs.m_numpoints)
68  {
69  return true;
70  }
71 
72  if (lhs.m_numpoints > rhs.m_numpoints)
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 232 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 230 of file Points.h.

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

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