43 namespace LibUtilities
61 for (
unsigned int i = 0; i < npts; ++i)
81 std::shared_ptr<PointsBaseType> ptr =
PointsManager()[gaussKey];
86 for (
unsigned int i = 0; i < npts; ++i)
89 for (
unsigned j = 0; j < npts; ++j)
116 for (
unsigned int i = 0; i < npts; ++i)
129 std::shared_ptr<PointsBaseType> returnval(
132 returnval->Initialize();
141 "Gauss Points can only interp to other 1d point distributions");
148 return GetI(numpoints, xpoints);
157 return GetI(numpoints, x);
169 std::shared_ptr<NekMatrix<NekDouble>> returnval(
182 for (
int i = 0; i < npts; ++i)
194 for (
int i = 0; i < pt; ++i)
196 h = h * (x - xpts[i]) / (xpts[pt] - xpts[i]);
199 for (
int i = pt + 1; i < npts; ++i)
201 h = h * (x - xpts[i]) / (xpts[pt] - xpts[i]);
213 for (
int j = 0; j < npts; ++j)
218 for (
int i = 0; i < npts; ++i)
224 h = h * (x - xpts[i]);
226 h = h / (xpts[pt] - xpts[i]);
#define ASSERTL0(condition, msg)
bool RegisterCreator(const KeyType &key, const CreateFuncType &createFunc)
Register the given function and associate it with the key. The return value is just to facilitate cal...
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.
virtual void v_CalculatePoints()
PointsKey m_pointsKey
Points type for this points distributions.
unsigned int GetNumPoints() const
unsigned int GetTotNumPoints() const
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
virtual void v_CalculateDerivMatrix()
const MatrixSharedPtrType GetI(const PointsKey &key)
virtual void v_CalculateWeights()
Defines a specification for a set of points.
unsigned int GetPointsDim() const
unsigned int GetNumPoints() const
NekDouble LagrangePoly(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
static bool initPointsManager[]
virtual void v_CalculatePoints() override
virtual void v_CalculateDerivMatrix() override
NekDouble LagrangePolyDeriv(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
void CalculateInterpMatrix(unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
virtual const std::shared_ptr< NekMatrix< NekDouble > > v_GetI(const PointsKey &pkey) override
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
virtual void v_CalculateWeights() override
NekDouble LagrangeInterpolant(NekDouble x, int npts, const Array< OneD, const NekDouble > &xpts, const Array< OneD, const NekDouble > &funcvals)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
PointsManagerT & PointsManager(void)
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
The above copyright notice and this permission notice shall be included.