Nektar++
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
Nektar::LibUtilities::FourierSingleModePoints Class Reference

#include <FourierSingleModePoints.h>

Inheritance diagram for Nektar::LibUtilities::FourierSingleModePoints:
[legend]

Public Member Functions

 ~FourierSingleModePoints () override
 
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix (const PointsKey &pkey)
 
 FourierSingleModePoints (const PointsKey &key)
 
- Public Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual ~Points ()
 
void Initialize (void)
 
size_t GetPointsDim () const
 
size_t GetNumPoints () const
 
size_t GetTotNumPoints () const
 
PointsType GetPointsType () const
 
const Array< OneD, const DataType > & GetZ () const
 
const Array< OneD, const DataType > & GetW () const
 
void GetZW (Array< OneD, const DataType > &z, Array< OneD, const DataType > &w) const
 
const Array< OneD, const NekDouble > & GetBaryWeights () const
 
void GetPoints (Array< OneD, const DataType > &x) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y) const
 
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y, Array< OneD, const DataType > &z) const
 
const MatrixSharedPtrTypeGetD (Direction dir=xDir) const
 
const MatrixSharedPtrType GetI (const PointsKey &key)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (size_t uint, const Array< OneD, const DataType > &x)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
 
const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
 
const MatrixSharedPtrType GetGalerkinProjection (const PointsKey &pkey)
 

Static Public Member Functions

static std::shared_ptr< PointsBaseTypeCreate (const PointsKey &key)
 

Protected Member Functions

const MatrixSharedPtrType v_GetI (const PointsKey &pkey) final
 
const MatrixSharedPtrType v_GetI (const Array< OneD, const NekDouble > &x) final
 
const MatrixSharedPtrType v_GetI (size_t numpoints, const Array< OneD, const NekDouble > &x) final
 
- Protected Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual void v_Initialize (void)
 
virtual void v_CalculatePoints ()
 
virtual void v_CalculateWeights ()
 

Private Member Functions

 FourierSingleModePoints ()=delete
 
 FourierSingleModePoints (const FourierSingleModePoints &points)=delete
 
void v_CalculatePoints () override
 
void v_CalculateWeights () override
 
void v_CalculateDerivMatrix () override
 
void CalculateInterpMatrix (size_t npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
 
NekDouble PeriodicSincFunction (const NekDouble x, const NekDouble h)
 

Static Private Attributes

static bool initPointsManager []
 

Additional Inherited Members

- Public Types inherited from Nektar::LibUtilities::Points< NekDouble >
typedef NekDouble DataType
 
typedef std::shared_ptr< NekMatrix< DataType > > MatrixSharedPtrType
 
- Protected Attributes inherited from Nektar::LibUtilities::Points< NekDouble >
PointsKey m_pointsKey
 Points type for this points distributions. More...
 
Array< OneD, DataTypem_points [3]
 Storage for the point locations, allowing for up to a 3D points storage. More...
 
Array< OneD, DataTypem_weights
 Quadrature weights for the weights. More...
 
Array< OneD, DataTypem_bcweights
 Barycentric weights. More...
 
MatrixSharedPtrType m_derivmatrix [3]
 Derivative matrices. More...
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_InterpManager
 
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLessm_GalerkinProjectionManager
 

Detailed Description

Definition at line 42 of file FourierSingleModePoints.h.

Constructor & Destructor Documentation

◆ ~FourierSingleModePoints()

Nektar::LibUtilities::FourierSingleModePoints::~FourierSingleModePoints ( )
inlineoverride

Definition at line 45 of file FourierSingleModePoints.h.

46 {
47 }

◆ FourierSingleModePoints() [1/3]

Nektar::LibUtilities::FourierSingleModePoints::FourierSingleModePoints ( const PointsKey key)
inline

Definition at line 54 of file FourierSingleModePoints.h.

54 : PointsBaseType(key)
55 {
56 namespace pl = std::placeholders;
57 m_InterpManager.RegisterCreator(
58 PointsKey(0, eGaussGaussLegendre),
59 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
60 m_InterpManager.RegisterCreator(
61 PointsKey(0, eGaussRadauMLegendre),
62 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
63 m_InterpManager.RegisterCreator(
64 PointsKey(0, eGaussRadauPLegendre),
65 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
66 m_InterpManager.RegisterCreator(
67 PointsKey(0, eGaussLobattoLegendre),
68 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
69 m_InterpManager.RegisterCreator(
70 PointsKey(0, eGaussGaussChebyshev),
71 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
72 m_InterpManager.RegisterCreator(
73 PointsKey(0, eGaussRadauMChebyshev),
74 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
75 m_InterpManager.RegisterCreator(
76 PointsKey(0, eGaussRadauPChebyshev),
77 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
78 m_InterpManager.RegisterCreator(
79 PointsKey(0, eGaussLobattoChebyshev),
80 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
81 m_InterpManager.RegisterCreator(
82 PointsKey(0, eGaussRadauMAlpha0Beta1),
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(
94 PointsKey(0, ePolyEvenlySpaced),
95 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
96 m_InterpManager.RegisterCreator(
97 PointsKey(0, eFourierEvenlySpaced),
98 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
99 m_InterpManager.RegisterCreator(
100 PointsKey(0, eFourierSingleModeSpaced),
101 std::bind(&FourierSingleModePoints::CreateMatrix, this, pl::_1));
102 }
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
Definition: Points.h:364
Points< NekDouble > PointsBaseType
@ 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

References CreateMatrix(), Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eFourierSingleModeSpaced, Nektar::LibUtilities::eGaussGaussChebyshev, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLobattoChebyshev, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha0Beta1, Nektar::LibUtilities::eGaussRadauMChebyshev, Nektar::LibUtilities::eGaussRadauMLegendre, Nektar::LibUtilities::eGaussRadauPChebyshev, Nektar::LibUtilities::eGaussRadauPLegendre, Nektar::LibUtilities::ePolyEvenlySpaced, and Nektar::LibUtilities::Points< NekDouble >::m_InterpManager.

◆ FourierSingleModePoints() [2/3]

Nektar::LibUtilities::FourierSingleModePoints::FourierSingleModePoints ( )
privatedelete

◆ FourierSingleModePoints() [3/3]

Nektar::LibUtilities::FourierSingleModePoints::FourierSingleModePoints ( const FourierSingleModePoints points)
privatedelete

Member Function Documentation

◆ CalculateInterpMatrix()

void Nektar::LibUtilities::FourierSingleModePoints::CalculateInterpMatrix ( size_t  npts,
const Array< OneD, const NekDouble > &  xpoints,
Array< OneD, NekDouble > &  interp 
)
private

Definition at line 127 of file FourierSingleModePoints.cpp.

131{
132 ASSERTL0(
133 false,
134 "CalculateInterpMatrix not available for Fourier Single Mode Points");
135}
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208

References ASSERTL0.

◆ Create()

std::shared_ptr< Points< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::Create ( const PointsKey key)
static

Definition at line 82 of file FourierSingleModePoints.cpp.

84{
85 std::shared_ptr<Points<NekDouble>> returnval(
87
88 returnval->Initialize();
89
90 return returnval;
91}
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ CreateMatrix()

std::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::CreateMatrix ( const PointsKey pkey)

Definition at line 93 of file FourierSingleModePoints.cpp.

95{
96 ASSERTL0(false,
97 "CreateMatrix not available for Fourier Single Mode Points");
98
99 return nullptr;
100}

References ASSERTL0.

Referenced by FourierSingleModePoints().

◆ PeriodicSincFunction()

NekDouble Nektar::LibUtilities::FourierSingleModePoints::PeriodicSincFunction ( const NekDouble  x,
const NekDouble  h 
)
private

◆ v_CalculateDerivMatrix()

void Nektar::LibUtilities::FourierSingleModePoints::v_CalculateDerivMatrix ( )
overrideprivate

Definition at line 76 of file FourierSingleModePoints.cpp.

77{
78
79 Points<NekDouble>::v_CalculateDerivMatrix();
80}

◆ v_CalculatePoints()

void Nektar::LibUtilities::FourierSingleModePoints::v_CalculatePoints ( )
overrideprivatevirtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 44 of file FourierSingleModePoints.cpp.

45{
46 // Allocate the storage for points
48 size_t npts = m_pointsKey.GetNumPoints();
49
50 if (npts == 1)
51 {
52 m_points[0][0] = 0.25;
53 }
54 else
55 {
56 ASSERTL0(npts == 2,
57 "Fourier points for single mode analysis should be 2");
58
59 m_points[0][0] = 0.0;
60 m_points[0][1] = 0.5;
61 }
62}
Array< OneD, DataType > m_points[3]
Storage for the point locations, allowing for up to a 3D points storage.
Definition: Points.h:356
PointsKey m_pointsKey
Points type for this points distributions.
Definition: Points.h:353
size_t GetNumPoints() const
Definition: Points.h:85

References ASSERTL0, Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::LibUtilities::Points< NekDouble >::m_points, Nektar::LibUtilities::Points< NekDouble >::m_pointsKey, and Nektar::LibUtilities::Points< NekDouble >::v_CalculatePoints().

◆ v_CalculateWeights()

void Nektar::LibUtilities::FourierSingleModePoints::v_CalculateWeights ( )
overrideprivatevirtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 64 of file FourierSingleModePoints.cpp.

65{
66 // Allocate the storage for points
68
69 size_t npts = m_pointsKey.GetNumPoints();
70 for (size_t i = 0; i < npts; ++i)
71 {
72 m_weights[i] = 1.0;
73 }
74}
Array< OneD, DataType > m_weights
Quadrature weights for the weights.
Definition: Points.h:358

References Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::LibUtilities::Points< NekDouble >::m_pointsKey, Nektar::LibUtilities::Points< NekDouble >::m_weights, and Nektar::LibUtilities::Points< NekDouble >::v_CalculateWeights().

◆ v_GetI() [1/3]

const std::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::v_GetI ( const Array< OneD, const NekDouble > &  x)
finalprotected

Definition at line 110 of file FourierSingleModePoints.cpp.

112{
113 ASSERTL0(false, "Interp not available for Fourier Single Mode Points");
114
115 return nullptr;
116}

References ASSERTL0.

◆ v_GetI() [2/3]

const std::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::v_GetI ( const PointsKey pkey)
finalprotected

Definition at line 102 of file FourierSingleModePoints.cpp.

104{
105 ASSERTL0(false, "Interp not available for Fourier Single Mode Points");
106
107 return nullptr;
108}

References ASSERTL0.

◆ v_GetI() [3/3]

const std::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::v_GetI ( size_t  numpoints,
const Array< OneD, const NekDouble > &  x 
)
finalprotected

Definition at line 118 of file FourierSingleModePoints.cpp.

121{
122 ASSERTL0(false, "Interp not available for Fourier Single Mode Points");
123
124 return nullptr;
125}

References ASSERTL0.

Member Data Documentation

◆ initPointsManager

bool Nektar::LibUtilities::FourierSingleModePoints::initPointsManager
staticprivate
Initial value:
= {
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
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...
Definition: NekManager.hpp:168
PointsManagerT & PointsManager(void)

Definition at line 113 of file FourierSingleModePoints.h.