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 
41 
42 namespace Nektar
43 {
44 namespace LibUtilities
45 {
46 class BLPoints : public Points<NekDouble>
47 {
48 public:
49  virtual ~BLPoints()
50  {
51  }
52 
53  LIB_UTILITIES_EXPORT static std::shared_ptr<PointsBaseType> Create(
54  const PointsKey &key);
55  LIB_UTILITIES_EXPORT std::shared_ptr<NekMatrix<NekDouble>> CreateMatrix(
56  const PointsKey &pkey);
57 
58  BLPoints(const PointsKey &key) : PointsBaseType(key)
59  {
60  namespace pl = std::placeholders;
61  m_InterpManager.RegisterCreator(
63  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
64  m_InterpManager.RegisterCreator(
66  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
67  m_InterpManager.RegisterCreator(
69  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
70  m_InterpManager.RegisterCreator(
72  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
73  m_InterpManager.RegisterCreator(
75  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
76  m_InterpManager.RegisterCreator(
78  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
79  m_InterpManager.RegisterCreator(
81  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
82  m_InterpManager.RegisterCreator(
84  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
85  m_InterpManager.RegisterCreator(
87  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
88  m_InterpManager.RegisterCreator(
89  PointsKey(0, eGaussRadauMAlpha0Beta2),
90  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
91  m_InterpManager.RegisterCreator(
92  PointsKey(0, eGaussRadauMAlpha1Beta0),
93  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
94  m_InterpManager.RegisterCreator(
95  PointsKey(0, eGaussRadauMAlpha2Beta0),
96  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
97  m_InterpManager.RegisterCreator(
99  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
100  m_InterpManager.RegisterCreator(
102  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
103  m_InterpManager.RegisterCreator(
105  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
106  m_InterpManager.RegisterCreator(
108  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
109  }
110 
111 protected:
113  const PointsKey &pkey) override;
115  const Array<OneD, const NekDouble> &x) override;
117  unsigned int numpoints, const Array<OneD, const NekDouble> &x) override;
118 
119 private:
120  static bool initPointsManager[];
121 
122  /// Default constructor should not be called except by Create
123  /// method.
125 
126  /// Copy constructor should not be called.
127  BLPoints(const BLPoints &points);
128 
129  virtual void v_CalculatePoints() override;
130  virtual void v_CalculateWeights() override;
131  virtual void v_CalculateDerivMatrix() override;
132 
133  void CalculateInterpMatrix(unsigned int npts,
134  const Array<OneD, const NekDouble> &xpoints,
135  Array<OneD, NekDouble> &interp);
136 }; // class BLPoints
137 } // namespace LibUtilities
138 } // namespace Nektar
139 
140 #endif // BLPoints_H
#define LIB_UTILITIES_EXPORT
std::shared_ptr< NekMatrix< NekDouble > > MatrixSharedPtrType
virtual void v_CalculatePoints() override
Definition: BLPoints.cpp:52
void CalculateInterpMatrix(unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
Definition: BLPoints.cpp:165
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Definition: BLPoints.cpp:109
virtual void v_CalculateDerivMatrix() override
Definition: BLPoints.cpp:103
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
Definition: BLPoints.cpp:119
BLPoints(const PointsKey &key)
Definition: BLPoints.h:58
virtual void v_CalculateWeights() override
Definition: BLPoints.cpp:99
BLPoints(const BLPoints &points)
Copy constructor should not be called.
static bool initPointsManager[]
Definition: BLPoints.h:120
BLPoints()
Default constructor should not be called except by Create method.
virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override
Definition: BLPoints.cpp:131
Stores a set of points of datatype DataT, defined by a PointKey.
Definition: Points.h:254
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
Definition: Points.h:383
Defines a specification for a set of points.
Definition: Points.h:59
@ eGaussRadauMLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:49
@ eBoundaryLayerPoints
1D power law distribution for boundary layer points
Definition: PointsType.h:79
@ eGaussRadauMAlpha0Beta1
Gauss Radau pinned at x=-1,.
Definition: PointsType.h:60
@ eGaussLobattoChebyshev
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:59
@ eFourierEvenlySpaced
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:76
@ eGaussRadauPChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:57
@ eGaussRadauMChebyshev
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:55
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:53
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:54
@ eBoundaryLayerPointsRev
1D power law distribution for boundary layer points
Definition: PointsType.h:81
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:75
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:48
@ eGaussRadauPLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:51
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2