Nektar++
BLPoints.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: BLPoints.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 boundary layer points
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef BLPOINTS_H
36#define BLPOINTS_H
37
39
41{
42class BLPoints : public Points<NekDouble>
43{
44public:
45 ~BLPoints() override
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(&BLPoints::CreateMatrix, this, pl::_1));
60 m_InterpManager.RegisterCreator(
62 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
63 m_InterpManager.RegisterCreator(
65 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
66 m_InterpManager.RegisterCreator(
68 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
69 m_InterpManager.RegisterCreator(
71 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
72 m_InterpManager.RegisterCreator(
74 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
75 m_InterpManager.RegisterCreator(
77 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
78 m_InterpManager.RegisterCreator(
80 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
81 m_InterpManager.RegisterCreator(
83 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
84 m_InterpManager.RegisterCreator(
85 PointsKey(0, eGaussRadauMAlpha0Beta2),
86 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
87 m_InterpManager.RegisterCreator(
88 PointsKey(0, eGaussRadauMAlpha1Beta0),
89 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
90 m_InterpManager.RegisterCreator(
91 PointsKey(0, eGaussRadauMAlpha2Beta0),
92 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
93 m_InterpManager.RegisterCreator(
95 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
96 m_InterpManager.RegisterCreator(
98 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
99 m_InterpManager.RegisterCreator(
101 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
102 m_InterpManager.RegisterCreator(
104 std::bind(&BLPoints::CreateMatrix, this, pl::_1));
105 }
106
107protected:
109 v_GetI(const PointsKey &pkey) final;
111 v_GetI(const Array<OneD, const NekDouble> &x) final;
113 v_GetI(size_t numpoints, const Array<OneD, const NekDouble> &x) final;
114
115private:
116 static bool initPointsManager[];
117
118 BLPoints() = delete;
119 BLPoints(const BLPoints &points) = delete;
120
121 void v_CalculatePoints() override;
122 void v_CalculateWeights() override;
123 void v_CalculateDerivMatrix() override;
124
125 void CalculateInterpMatrix(size_t npts,
126 const Array<OneD, const NekDouble> &xpoints,
127 Array<OneD, NekDouble> &interp);
128}; // class BLPoints
129} // namespace Nektar::LibUtilities
130
131#endif // BLPoints_H
#define LIB_UTILITIES_EXPORT
std::shared_ptr< NekMatrix< NekDouble > > MatrixSharedPtrType
void v_CalculatePoints() override
Definition: BLPoints.cpp:46
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Definition: BLPoints.cpp:103
void v_CalculateDerivMatrix() override
Definition: BLPoints.cpp:97
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
Definition: BLPoints.cpp:113
BLPoints(const PointsKey &key)
Definition: BLPoints.h:54
void v_CalculateWeights() override
Definition: BLPoints.cpp:93
const MatrixSharedPtrType v_GetI(const PointsKey &pkey) final
Definition: BLPoints.cpp:121
static bool initPointsManager[]
Definition: BLPoints.h:116
BLPoints(const BLPoints &points)=delete
void CalculateInterpMatrix(size_t npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
Definition: BLPoints.cpp:146
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
@ eBoundaryLayerPoints
1D power law distribution for boundary layer points
Definition: PointsType.h:77
@ 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
@ eBoundaryLayerPointsRev
1D power law distribution for boundary layer points
Definition: PointsType.h:79
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:73
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:46
@ eGaussRadauPLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:49