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 size_t &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)=default
 Copy constructor. More...
 
PointsKeyoperator= (const PointsKey &key)=default
 
size_t 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)
 
size_t GetPointsDim () const
 
size_t GetTotNumPoints () const
 

Protected Attributes

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

Constructor & Destructor Documentation

◆ PointsKey() [1/3]

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

Default constructor.

Definition at line 62 of file Points.h.

65 {
66 }
size_t m_numpoints
number of the points (as appropriately defined for PointsType)
Definition: Points.h:216
PointsType m_pointstype
Type of Points.
Definition: Points.h:218
NekDouble m_factor
optional factor
Definition: Points.h:219
static const NekDouble kNekUnsetDouble

◆ PointsKey() [2/3]

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

Constructor defining the number and distribution of points.

Definition at line 69 of file Points.h.

71 : m_numpoints(numpoints), m_pointstype(pointstype), m_factor(factor)
72 {
73 }

◆ ~PointsKey()

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

Destructor.

Definition at line 76 of file Points.h.

77 {
78 }

◆ PointsKey() [3/3]

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

Copy constructor.

Member Function Documentation

◆ GetFactor()

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

Definition at line 95 of file Points.h.

96 {
97 return m_factor;
98 }

References m_factor.

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

◆ GetNumPoints()

size_t Nektar::LibUtilities::PointsKey::GetNumPoints ( ) const
inline

Definition at line 85 of file Points.h.

86 {
87 return m_numpoints;
88 }

References m_numpoints.

Referenced by Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_2D(), Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_3D(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::LibUtilities::FourierPoints::CalculateInterpMatrix(), Nektar::LibUtilities::GaussPoints::CalculateInterpMatrix(), Nektar::LibUtilities::PolyEPoints::CalculateInterpMatrix(), Nektar::LibUtilities::FourierPoints::CreateMatrix(), Nektar::LibUtilities::GaussPoints::CreateMatrix(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::Points< DataT >::GetNumPoints(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::Interp3D(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTraceTranspose(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace(), Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTraceTranspose(), Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocEdges(), Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocFaces(), Nektar::LibUtilities::operator<<(), Nektar::LibUtilities::PhysGalerkinProject1D(), Nektar::LibUtilities::PhysGalerkinProject2D(), Nektar::LibUtilities::PhysGalerkinProject3D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup(), Nektar::LibUtilities::GaussPoints::v_CalculateDerivMatrix(), Nektar::LibUtilities::PolyEPoints::v_CalculateDerivMatrix(), Nektar::LibUtilities::FourierPoints::v_CalculateDerivMatrix(), Nektar::LibUtilities::GaussPoints::v_CalculatePoints(), Nektar::LibUtilities::PolyEPoints::v_CalculatePoints(), Nektar::LibUtilities::BLPoints::v_CalculatePoints(), Nektar::LibUtilities::FourierPoints::v_CalculatePoints(), Nektar::LibUtilities::FourierSingleModePoints::v_CalculatePoints(), Nektar::LibUtilities::PolyEPoints::v_CalculateWeights(), Nektar::LibUtilities::FourierPoints::v_CalculateWeights(), Nektar::LibUtilities::FourierSingleModePoints::v_CalculateWeights(), Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal(), Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal(), Nektar::LocalRegions::TriExp::v_ComputeTraceNormal(), Nektar::LibUtilities::PolyEPoints::v_GetI(), and Nektar::MultiRegions::ExpList::v_GetNormals().

◆ GetPointsDim()

size_t Nektar::LibUtilities::PointsKey::GetPointsDim ( ) const
inline

Definition at line 128 of file Points.h.

129 {
130 size_t dimpoints = 1;
131
132 switch (m_pointstype)
133 {
134 case eNodalTriElec:
135 case eNodalTriFekete:
137 case eNodalTriSPI:
138 case eNodalQuadElec:
139 dimpoints = 2;
140 break;
141
142 case eNodalTetElec:
145 case eNodalPrismElec:
146 case eNodalHexElec:
147 dimpoints = 3;
148 break;
149
150 default:
151 break;
152 }
153
154 return dimpoints;
155 }
@ eNodalPrismEvenlySpaced
3D Evenly-spaced points on a Prism
Definition: PointsType.h:86
@ eNodalTriFekete
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:82
@ eNodalTriElec
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:81
@ eNodalTriEvenlySpaced
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:83
@ eNodalHexElec
3D GLL for hex
Definition: PointsType.h:94
@ eNodalQuadElec
2D GLL for quad
Definition: PointsType.h:93
@ eNodalTetEvenlySpaced
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:84
@ eNodalPrismElec
3D electrostatically spaced points on a Prism
Definition: PointsType.h:87
@ eNodalTetElec
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:85
@ eNodalTriSPI
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:88

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::Basis::GetI(), Nektar::LibUtilities::Points< DataT >::GetPointsDim(), Nektar::LibUtilities::FourierPoints::v_GetI(), Nektar::LibUtilities::GaussPoints::v_GetI(), Nektar::LibUtilities::NodalPrismElec::v_GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::v_GetI(), Nektar::LibUtilities::NodalTetElec::v_GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::v_GetI(), Nektar::LibUtilities::NodalTriElec::v_GetI(), Nektar::LibUtilities::NodalTriEvenlySpaced::v_GetI(), Nektar::LibUtilities::NodalTriFekete::v_GetI(), and Nektar::LibUtilities::PolyEPoints::v_GetI().

◆ GetPointsType()

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

◆ GetTotNumPoints()

size_t Nektar::LibUtilities::PointsKey::GetTotNumPoints ( ) const
inline

Definition at line 158 of file Points.h.

159 {
160 size_t totpoints = m_numpoints;
161
162 switch (m_pointstype)
163 {
164 case eNodalTriElec:
165 case eNodalTriFekete:
167 totpoints = m_numpoints * (m_numpoints + 1) / 2;
168 break;
169 case eNodalTriSPI:
171 "This method cannot be implemented");
172 break;
173
174 case eNodalQuadElec:
175 totpoints = m_numpoints * m_numpoints;
176 break;
177
178 case eNodalTetElec:
180 totpoints =
181 m_numpoints * (m_numpoints + 1) * (m_numpoints + 2) / 6;
182 break;
183 case eNodalTetSPI:
185 "This method cannot be implemented");
186 break;
187
189 case eNodalPrismElec:
190 totpoints = m_numpoints * m_numpoints * (m_numpoints + 1) / 2;
191 break;
192 case eNodalPrismSPI:
194 "This method cannot be implemented");
195 break;
196
197 case eNodalHexElec:
198 totpoints = m_numpoints * m_numpoints * m_numpoints;
199 break;
200
201 default:
202 break;
203 }
204
205 return totpoints;
206 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202
@ eNodalPrismSPI
3D prism SPI
Definition: PointsType.h:92
@ eNodalTetSPI
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
Definition: PointsType.h:90

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

Referenced by Nektar::LibUtilities::BasisKey::GetTotNumPoints(), Nektar::LibUtilities::Points< DataT >::GetTotNumPoints(), Nektar::LibUtilities::GaussPoints::v_CalculateDerivMatrix(), Nektar::LibUtilities::NodalTetElec::v_CalculatePoints(), Nektar::LibUtilities::NodalTriElec::v_CalculatePoints(), and Nektar::LibUtilities::NodalTriFekete::v_CalculatePoints().

◆ operator!=() [1/2]

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

Definition at line 117 of file Points.h.

118 {
119 return (!(*this == y));
120 }

◆ operator!=() [2/2]

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

Definition at line 122 of file Points.h.

123 {
124 return (!(*this == *y));
125 }

◆ operator=()

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

◆ operator==() [1/2]

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

Definition at line 100 of file Points.h.

101 {
102
103 if (fabs(m_factor - key.m_factor) < NekConstants::kNekZeroTol)
104 {
105 return (m_numpoints == key.m_numpoints &&
106 m_pointstype == key.m_pointstype);
107 }
108
109 return false;
110 }
static const NekDouble kNekZeroTol

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

◆ operator==() [2/2]

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

Definition at line 112 of file Points.h.

113 {
114 return (*this == *y);
115 }

Friends And Related Function Documentation

◆ operator<

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

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

52{
53 if (lhs.m_pointstype < rhs.m_pointstype)
54 {
55 return true;
56 }
57
58 if (lhs.m_pointstype > rhs.m_pointstype)
59 {
60 return false;
61 }
62
63 if (lhs.m_numpoints < rhs.m_numpoints)
64 {
65 return true;
66 }
67
68 if (lhs.m_numpoints > rhs.m_numpoints)
69 {
70 return false;
71 }
72
73 if (lhs.m_factor < rhs.m_factor)
74 {
75 return true;
76 }
77
78 if (lhs.m_factor > rhs.m_factor)
79 {
80 return false;
81 }
82
83 return false;
84}

◆ operator==

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

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

46{
47 return (lhs.m_numpoints == rhs.m_numpoints &&
48 lhs.m_pointstype == rhs.m_pointstype);
49}

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

Referenced by GetFactor(), and operator==().

◆ m_numpoints

size_t Nektar::LibUtilities::PointsKey::m_numpoints
protected

number of the points (as appropriately defined for PointsType)

Definition at line 216 of file Points.h.

Referenced by GetNumPoints(), GetTotNumPoints(), and operator==().

◆ m_pointstype

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