47 namespace LibUtilities
138 case eGaussRadauMAlpha0Beta2:
143 case eGaussRadauMAlpha1Beta0:
148 case eGaussRadauMAlpha2Beta0:
153 case eGaussKronrodLegendre:
175 "Unknown Gauss quadrature point distribution requested");
193 NekDouble *dmtemp = dmtempSharedArray.data();
233 case eGaussRadauMAlpha0Beta2:
237 case eGaussRadauMAlpha1Beta0:
241 case eGaussRadauMAlpha2Beta0:
245 case eGaussKronrodLegendre:
265 "Unknown Gauss quadrature point distribution requested");
268 std::copy(dmtemp, dmtemp + totpoints * totpoints,
323 case eGaussRadauMAlpha0Beta2:
328 case eGaussRadauMAlpha1Beta0:
333 case eGaussRadauMAlpha2Beta0:
338 case eGaussKronrodLegendre:
343 for (
unsigned int i = 0; i < npts; ++i)
356 "Unknown Gauss quadrature point distribution requested");
362 std::shared_ptr<Points<NekDouble>> returnval(
365 returnval->Initialize();
379 return GetI(numpoints, xpoints);
386 "Gauss Points can only interp to other 1d point distributions");
397 return GetI(numpoints, x);
409 std::shared_ptr<NekMatrix<NekDouble>> returnval(
422 for (
int i = 0; i < npts; ++i)
434 for (
int i = 0; i < pt; ++i)
436 h = h * (x - xpts[i]) / (xpts[pt] - xpts[i]);
439 for (
int i = pt + 1; i < npts; ++i)
441 h = h * (x - xpts[i]) / (xpts[pt] - xpts[i]);
453 for (
int j = 0; j < npts; ++j)
458 for (
int i = 0; i < npts; ++i)
464 h = h * (x - xpts[i]);
466 h = h / (xpts[pt] - xpts[i]);
484 std::shared_ptr<NekMatrix<NekDouble>> returnval =
501 std::shared_ptr<NekMatrix<NekDouble>> Interp =
GetI(pkey);
507 for (
int i = 0; i < numpointsto; ++i)
509 Vmath::Vmul(numpointsfrom, Interp->GetPtr().get() + i * numpointsfrom,
510 1, &weightsfrom[0], 1, &GalProj[0] + i, numpointsto);
512 numpointsto, &GalProj[0] + i, numpointsto);
516 std::shared_ptr<NekMatrix<NekDouble>> returnval(
518 numpointsto, numpointsfrom, t));
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
static std::shared_ptr< Points< NekDouble > > Create(const PointsKey &pkey)
std::shared_ptr< NekMatrix< NekDouble > > CreateGPMatrix(const PointsKey &pkey)
NekDouble LagrangePolyDeriv(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
virtual const std::shared_ptr< NekMatrix< NekDouble > > v_GetGalerkinProjection(const PointsKey &pkey) override
NekDouble LagrangeInterpolant(NekDouble x, int npts, const Array< OneD, const NekDouble > &xpts, const Array< OneD, const NekDouble > &funcvals)
functions used by the Kronrod points
virtual void v_CalculateWeights() override
virtual void v_CalculatePoints() override
void CalculateInterpMatrix(unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
virtual const std::shared_ptr< NekMatrix< NekDouble > > v_GetI(const PointsKey &pkey) override
static bool initPointsManager[]
NekDouble LagrangePoly(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
std::shared_ptr< NekMatrix< NekDouble > > CalculateGalerkinProjectionMatrix(const PointsKey &pkey)
virtual void v_CalculateDerivMatrix() override
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.
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_GalerkinProjectionManager
virtual void v_CalculatePoints()
PointsKey m_pointsKey
Points type for this points distributions.
unsigned int GetNumPoints() 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 GetTotNumPoints() const
PointsType GetPointsType() const
unsigned int GetPointsDim() const
unsigned int GetNumPoints() const
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
PointsManagerT & PointsManager(void)
@ eGaussRadauMLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
@ 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
@ eGaussRadauPChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
@ 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
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
@ eGaussLobattoKronrodLegendre
1D Lobatto Kronrod quadrature points
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eGaussRadauPLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
The above copyright notice and this permission notice shall be included.
void Dgj(double *D, const double *z, const int np, const double alpha, const double beta)
Compute the Derivative Matrix and its transpose associated with the Gauss-Jacobi zeros.
void zwgrjm(double *z, double *w, const int np, const double alpha, const double beta)
Gauss-Radau-Jacobi zeros and weights with end point at z=-1.
void zwgrjp(double *z, double *w, const int np, const double alpha, const double beta)
Gauss-Radau-Jacobi zeros and weights with end point at z=1.
void Dglj(double *D, const double *z, const int np, const double alpha, const double beta)
Compute the Derivative Matrix associated with the Gauss-Lobatto-Jacobi zeros.
void Imgrjp(double *im, const double *zgrj, const double *zm, const int nz, const int mz, const double alpha, const double beta)
Interpolation Operator from Gauss-Radau-Jacobi points (including z=1) to an arbitrary distrubtion at ...
void zwglj(double *z, double *w, const int np, const double alpha, const double beta)
Gauss-Lobatto-Jacobi zeros and weights with end point at z=-1,1.
void zwgj(double *z, double *w, const int np, const double alpha, const double beta)
Gauss-Jacobi zeros and weights.
void Imgj(double *im, const double *zgj, const double *zm, const int nz, const int mz, const double alpha, const double beta)
Interpolation Operator from Gauss-Jacobi points to an arbitrary distribution at points zm.
void Imgrjm(double *im, const double *zgrj, const double *zm, const int nz, const int mz, const double alpha, const double beta)
Interpolation Operator from Gauss-Radau-Jacobi points (including z=-1) to an arbitrary distrubtion at...
void zwgk(double *z, double *w, const int npt, const double alpha, const double beta)
Gauss-Kronrod-Jacobi zeros and weights.
void Dgrjm(double *D, const double *z, const int np, const double alpha, const double beta)
Compute the Derivative Matrix and its transpose associated with the Gauss-Radau-Jacobi zeros with a z...
void Dgrjp(double *D, const double *z, const int np, const double alpha, const double beta)
Compute the Derivative Matrix associated with the Gauss-Radau-Jacobi zeros with a zero at z=1.
void zwrk(double *z, double *w, const int npt, const double alpha, const double beta)
Gauss-Radau-Kronrod-Jacobi zeros and weights.
void Imglj(double *im, const double *zglj, const double *zm, const int nz, const int mz, const double alpha, const double beta)
Interpolation Operator from Gauss-Lobatto-Jacobi points to an arbitrary distrubtion at points zm.
void zwlk(double *z, double *w, const int npt, const double alpha, const double beta)
Gauss-Lobatto-Kronrod-Jacobi zeros and weights.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.