43 namespace LibUtilities
62 for(
unsigned int i=0;i<npts;++i)
82 std::shared_ptr<PointsBaseType> ptr =
PointsManager()[gaussKey];
87 for(
unsigned int i=0; i<npts;++i)
90 for(
unsigned j=0;j<npts;++j)
114 for(
unsigned int i=0;i<npts;++i)
127 returnval->Initialize();
134 ASSERTL0(pkey.
GetPointsDim()==1,
"Gauss Points can only interp to other 1d point distributions");
141 return GetI(numpoints, xpoints);
149 return GetI(numpoints, x);
171 for(
int i=0;i<npts;++i)
183 for(
int i=0;i<pt; ++i)
185 h = h * (x - xpts[i])/(xpts[pt]-xpts[i]);
188 for(
int i=pt+1;i<npts;++i)
190 h = h * (x - xpts[i])/(xpts[pt]-xpts[i]);
201 for(
int j=0;j<npts;++j)
206 for(
int i=0;i<npts;++i)
214 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 CalculateWeights()
virtual void CalculateDerivMatrix()
PointsKey m_pointsKey
Points type for this points distributions.
unsigned int GetNumPoints() const
virtual void CalculatePoints()
unsigned int GetTotNumPoints() const
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
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)
void CalculateDerivMatrix()
static bool initPointsManager[]
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)
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
const std::shared_ptr< NekMatrix< NekDouble > > GetI(const PointsKey &pkey)
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.