51 ASSERTL0(!(npts % 2),
"Fourier points need to be of even order");
54 for (
size_t i = 0; i < npts; ++i)
66 for (
size_t i = 0; i < npts; ++i)
79 for (
size_t i = 1; i < npts; ++i)
84 for (
size_t i = 1; i < npts; ++i)
88 cos(M_PI * i / npts) /
89 sin(M_PI * i / npts));
92 for (
size_t i = 1; i < npts; ++i)
94 for (
size_t j = 0; j < npts; ++j)
104 std::shared_ptr<Points<NekDouble>> returnval(
107 returnval->Initialize();
121 return GetI(numpoints, xpoints);
128 "Fourier Points can only interp to other 1d point distributions");
136 size_t numpoints = 1;
139 return GetI(numpoints, x);
151 std::shared_ptr<NekMatrix<NekDouble>> returnval(
163 for (
size_t i = 0; i < npts; ++i)
182 if (fabs(x) > 1.0e-12)
184 y = sin(M_PI * x / (M_PI * h)) / ((2.0 / h) * tan(0.5 * x));
#define ASSERTL0(condition, msg)
virtual void v_CalculatePoints() override
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
void CalculateInterpMatrix(size_t npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
virtual void v_CalculateWeights() override
virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override final
NekDouble PeriodicSincFunction(const NekDouble x, const NekDouble h)
static bool initPointsManager[]
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...
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
virtual void v_CalculatePoints()
size_t GetNumPoints() const
PointsKey m_pointsKey
Points type for this points distributions.
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
const MatrixSharedPtrType GetI(const PointsKey &key)
virtual void v_CalculateWeights()
Defines a specification for a set of points.
size_t GetPointsDim() const
size_t GetNumPoints() const
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
PointsManagerT & PointsManager(void)
@ eFourierEvenlySpaced
1D Evenly-spaced points using Fourier Fit
The above copyright notice and this permission notice shall be included.