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 >
54  Create(const PointsKey &key);
55  LIB_UTILITIES_EXPORT std::shared_ptr< NekMatrix<NekDouble> >
56  CreateMatrix(const PointsKey &pkey);
57 
59  GetI(const PointsKey &pkey);
63  GetI(unsigned int numpoints,
65 
67  {
68  namespace pl = std::placeholders;
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(
86  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
87  m_InterpManager.RegisterCreator(
89  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
90  m_InterpManager.RegisterCreator(
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  m_InterpManager.RegisterCreator(
107  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
108  m_InterpManager.RegisterCreator(
110  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
111  m_InterpManager.RegisterCreator(
113  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
114  m_InterpManager.RegisterCreator(
116  std::bind(&BLPoints::CreateMatrix, this, pl::_1));
117  }
118 
119  private:
120  static bool initPointsManager[];
121 
122  /// Default constructor should not be called except by Create
123  /// method.
124  BLPoints();
125 
126  /// Copy constructor should not be called.
127  BLPoints(const BLPoints &points);
128 
129  void CalculatePoints();
130  void CalculateWeights();
131  void CalculateDerivMatrix();
133  unsigned int npts,
134  const Array<OneD, const NekDouble>& xpoints,
135  Array<OneD, NekDouble>& interp);
136  }; // class BLPoints
137  } // end of namespace
138 } // end of namespace
139 
140 
141 #endif //BLPoints_H
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:53
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:50
std::shared_ptr< NekMatrix< NekDouble > > CreateMatrix(const PointsKey &pkey)
Definition: BLPoints.cpp:119
Stores a set of points of datatype DataT, defined by a PointKey.
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:48
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:58
BLPoints(const PointsKey &key)
Definition: BLPoints.h:66
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:64
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:65
std::shared_ptr< NekMatrix< DataType > > MatrixSharedPtrType
Definition: Points.h:254
#define LIB_UTILITIES_EXPORT
NekManager< PointsKey, NekMatrix< DataType >, PointsKey::opLess > m_InterpManager
Definition: Points.h:384
BLPoints()
Default constructor should not be called except by Create method.
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:54
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:52
Defines a specification for a set of points.
Definition: Points.h:59
1D power law distribution for boundary layer points
Definition: PointsType.h:68
const MatrixSharedPtrType GetI(const PointsKey &pkey)
Definition: BLPoints.cpp:130
void CalculateInterpMatrix(unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
Definition: BLPoints.cpp:158
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:59
1D power law distribution for boundary layer points
Definition: PointsType.h:67
static bool initPointsManager[]
Definition: BLPoints.h:120
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:57
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:56
static std::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Definition: BLPoints.cpp:109
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:51
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:49
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:55