Nektar++
FourierSingleModePoints.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: FourierSingleModePoints.h
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Header file of 1D Fourier Single Mode space distribution
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef FOURIERSINGLEMODEPOINTS_H
36#define FOURIERSINGLEMODEPOINTS_H
37
39
41{
42class FourierSingleModePoints : public Points<NekDouble>
43{
44public:
46 {
47 }
48
49 LIB_UTILITIES_EXPORT static std::shared_ptr<PointsBaseType> Create(
50 const PointsKey &key);
51 LIB_UTILITIES_EXPORT std::shared_ptr<NekMatrix<NekDouble>> CreateMatrix(
52 const PointsKey &pkey);
53
55 {
56 namespace pl = std::placeholders;
57 m_InterpManager.RegisterCreator(
59 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
60 m_InterpManager.RegisterCreator(
62 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
63 m_InterpManager.RegisterCreator(
65 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
66 m_InterpManager.RegisterCreator(
68 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
69 m_InterpManager.RegisterCreator(
71 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
72 m_InterpManager.RegisterCreator(
74 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
75 m_InterpManager.RegisterCreator(
77 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
78 m_InterpManager.RegisterCreator(
80 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
81 m_InterpManager.RegisterCreator(
83 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
84 m_InterpManager.RegisterCreator(
85 PointsKey(0, eGaussRadauMAlpha0Beta2),
86 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
87 m_InterpManager.RegisterCreator(
88 PointsKey(0, eGaussRadauMAlpha1Beta0),
89 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
90 m_InterpManager.RegisterCreator(
91 PointsKey(0, eGaussRadauMAlpha2Beta0),
92 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
93 m_InterpManager.RegisterCreator(
95 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
96 m_InterpManager.RegisterCreator(
98 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
99 m_InterpManager.RegisterCreator(
101 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
102 }
103
104protected:
106 v_GetI(const PointsKey &pkey) final;
108 v_GetI(const Array<OneD, const NekDouble> &x) final;
110 v_GetI(size_t numpoints, const Array<OneD, const NekDouble> &x) final;
111
112private:
113 static bool initPointsManager[];
114
117
118 void v_CalculatePoints() override;
119 void v_CalculateWeights() override;
120 void v_CalculateDerivMatrix() override;
121
122 void CalculateInterpMatrix(size_t npts,
123 const Array<OneD, const NekDouble> &xpoints,
124 Array<OneD, NekDouble> &interp);
125
127}; // class FourierPoints
128} // namespace Nektar::LibUtilities
129
130#endif // FOURIERSINGLEMODEPOINTS_H
#define LIB_UTILITIES_EXPORT
std::shared_ptr< NekMatrix< NekDouble > > MatrixSharedPtrType
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
void CalculateInterpMatrix(size_t npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
FourierSingleModePoints(const FourierSingleModePoints &points)=delete
const MatrixSharedPtrType v_GetI(const PointsKey &pkey) final
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
NekDouble PeriodicSincFunction(const NekDouble x, const NekDouble h)
Stores a set of points of datatype DataT, defined by a PointKey.
Definition: Points.h:235
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
Definition: Points.h:364
Defines a specification for a set of points.
Definition: Points.h:50
@ eGaussRadauMLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:47
@ eGaussRadauMAlpha0Beta1
Gauss Radau pinned at x=-1,.
Definition: PointsType.h:58
@ eGaussLobattoChebyshev
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:57
@ eFourierEvenlySpaced
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:74
@ eGaussRadauPChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:55
@ eGaussRadauMChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:53
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:51
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:52
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:73
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:46
@ eFourierSingleModeSpaced
1D Non Evenly-spaced points for Single Mode analysis
Definition: PointsType.h:75
@ eGaussRadauPLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:49
double NekDouble