35#ifndef NEKTAR_LIB_UTILITIES_FOUNDATIONS_POINTS_H
36#define NEKTAR_LIB_UTILITIES_FOUNDATIONS_POINTS_H
64 m_factor(NekConstants::kNekUnsetDouble)
114 return (*
this == *y);
119 return (!(*
this == y));
124 return (!(*
this == *y));
130 size_t dimpoints = 1;
171 "This method cannot be implemented");
185 "This method cannot be implemented");
194 "This method cannot be implemented");
257 return 2 * (npt - 2) - 1;
261 return 2 * (npt - 1) - 1;
267 case eGaussRadauMAlpha0Beta2:
268 case eGaussRadauMAlpha1Beta0:
269 case eGaussRadauMAlpha2Beta0:
278 case eGaussKronrodLegendre:
280 return 3 * (npt - 1) / 2 + 1;
285 return 3 * (npt - 2) / 2;
289 return 3 * (npt - 3) / 2;
412 return v_GetI(uint, x);
425 return v_GetI(x, y, z);
430 return v_GetGalerkinProjection(pkey);
454 v_CalculateBaryWeights();
455 v_CalculateDerivMatrix();
463 for (
size_t i = 0; i < pointsDim; ++i)
485 virtual void v_CalculateBaryWeights()
492 for (
size_t i = 0; i < totNumPoints; ++i)
494 for (
size_t j = 0; j < totNumPoints; ++j)
508 virtual void v_CalculateDerivMatrix()
514 MemoryManager<NekMatrix<DataType>>::AllocateSharedPtr(
515 totNumPoints, totNumPoints);
524 [[maybe_unused]]
const PointsKey &key)
527 std::shared_ptr<NekMatrix<NekDouble>> returnval(
528 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
533 [[maybe_unused]]
const Array<OneD, const DataType> &x)
536 std::shared_ptr<NekMatrix<NekDouble>> returnval(
537 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
542 size_t, [[maybe_unused]]
const Array<OneD, const DataType> &x)
545 std::shared_ptr<NekMatrix<NekDouble>> returnval(
546 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
551 [[maybe_unused]]
const Array<OneD, const DataType> &x,
552 [[maybe_unused]]
const Array<OneD, const DataType> &y)
555 std::shared_ptr<NekMatrix<NekDouble>> returnval(
556 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
561 [[maybe_unused]]
const Array<OneD, const DataType> &x,
562 [[maybe_unused]]
const Array<OneD, const DataType> &y,
563 [[maybe_unused]]
const Array<OneD, const DataType> &z)
566 std::shared_ptr<NekMatrix<NekDouble>> returnval(
567 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
572 [[maybe_unused]]
const PointsKey &pkey)
575 std::shared_ptr<NekMatrix<NekDouble>> returnval(
576 MemoryManager<NekMatrix<NekDouble>>::AllocateSharedPtr());
581 Points(
const Points &pts) =
delete;
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define LIB_UTILITIES_EXPORT
std::shared_ptr< NekMatrix< NekDouble > > MatrixSharedPtrType
Stores a set of points of datatype DataT, defined by a PointKey.
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
MatrixSharedPtrType m_derivmatrix[3]
Derivative matrices.
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
size_t GetPointsDim() const
void GetPoints(Array< OneD, const DataType > &x, Array< OneD, const DataType > &y) const
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_GalerkinProjectionManager
virtual void v_CalculatePoints()
const MatrixSharedPtrType GetI(size_t uint, const Array< OneD, const DataType > &x)
size_t GetNumPoints() const
PointsKey m_pointsKey
Points type for this points distributions.
void GetZW(Array< OneD, const DataType > &z, Array< OneD, const DataType > &w) const
virtual void v_Initialize(void)
void GetPoints(Array< OneD, const DataType > &x) const
void GetPoints(Array< OneD, const DataType > &x, Array< OneD, const DataType > &y, Array< OneD, const DataType > &z) const
PointsType GetPointsType() const
const MatrixSharedPtrType GetI(const Array< OneD, const DataType > &x)
const Array< OneD, const DataType > & GetW() const
const Array< OneD, const NekDouble > & GetBaryWeights() const
const MatrixSharedPtrType GetI(const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
size_t GetTotNumPoints() const
std::shared_ptr< NekMatrix< DataType > > MatrixSharedPtrType
const MatrixSharedPtrType & GetD(Direction dir=xDir) const
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
const MatrixSharedPtrType GetI(const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
const MatrixSharedPtrType GetI(const PointsKey &key)
const Array< OneD, const DataType > & GetZ() const
virtual void v_CalculateWeights()
const MatrixSharedPtrType GetGalerkinProjection(const PointsKey &pkey)
Array< OneD, DataType > m_bcweights
Barycentric weights.
Defines a specification for a set of points.
static void GetEffectiveQuadRange(const LibUtilities::PointsKey &pkey, int &q_begin, int &q_end)
offset the m_nq_begin and m_nq_end according to the points type
size_t m_numpoints
number of the points (as appropriately defined for PointsType)
bool operator==(const PointsKey *y)
PointsKey GetEquivalentPointsKey(const PointsType ptype)
size_t GetPointsDim() const
PointsKey(const PointsKey &key)=default
Copy constructor.
PointsType GetPointsType() const
PointsKey & operator=(const PointsKey &key)=default
friend bool opLess::operator()(const PointsKey &lhs, const PointsKey &rhs) const
friend bool operator<(const PointsKey &lhs, const PointsKey &rhs)
PointsType m_pointstype
Type of Points.
PointsKey(const size_t &numpoints, const PointsType &pointstype, const NekDouble factor=NekConstants::kNekUnsetDouble)
Constructor defining the number and distribution of points.
size_t GetTotNumPoints() const
bool operator==(const PointsKey &key)
size_t GetNumPoints() const
NekDouble GetFactor() const
NekDouble m_factor
optional factor
static int GetDegreeOfExactness(const PointsType ptype, const int npt)
Get degree of exactness for quadrature points.
friend bool operator==(const PointsKey &lhs, const PointsKey &rhs)
virtual ~PointsKey()
Destructor.
bool operator!=(const PointsKey &y)
PointsKey(void)
Default constructor.
bool operator!=(const PointsKey *y)
bool operator==(const BasisKey &x, const BasisKey &y)
bool operator<(const BasisKey &lhs, const BasisKey &rhs)
std::vector< PointsKey > PointsKeyVector
std::ostream & operator<<(std::ostream &os, const BasisKey &rhs)
@ eNodalPrismEvenlySpaced
3D Evenly-spaced points on a Prism
@ eNodalTriFekete
2D Nodal Fekete Points on a Triangle
@ eGaussRadauMLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
@ eGaussLegendreWithMP
1D Gauss-Legendre quadrature points with additional x=-1 and x=1 end points
@ eNodalPrismSPI
3D prism SPI
@ eGaussRadauMAlpha0Beta1
Gauss Radau pinned at x=-1,.
@ eGaussRadauKronrodMLegendre
1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1
@ eGaussLobattoChebyshev
1D Gauss-Lobatto-Legendre quadrature points
@ eNodalTriElec
2D Nodal Electrostatic Points on a Triangle
@ eNodalTriEvenlySpaced
2D Evenly-spaced points on a Triangle
@ eNodalHexElec
3D GLL for hex
@ eGaussRadauMChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
@ eGaussRadauKronrodMAlpha1Beta0
1D Gauss-Radau-Kronrod-Legendre pinned at x=-1,
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussLegendreWithM
1D Gauss-Legendre quadrature points with additional x=-1 point
@ eNodalQuadElec
2D GLL for quad
@ eNodalTetEvenlySpaced
3D Evenly-spaced points on a Tetrahedron
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
@ eNodalTetSPI
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
@ eGaussLobattoKronrodLegendre
1D Lobatto Kronrod quadrature points
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eNodalPrismElec
3D electrostatically spaced points on a Prism
@ eNodalTetElec
3D Nodal Electrostatic Points on a Tetrahedron
@ eGaussRadauPLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
@ eNodalTriSPI
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
static const PointsKey NullPointsKey(0, eNoPointsType)
static const NekDouble kNekUnsetDouble
static const NekDouble kNekZeroTol
bool operator()(const PointsKey &lhs, const PointsKey &rhs) const