Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ManagerAccess.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Points1D.cpp
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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: C functions to provide access to managers.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #include <loki/Singleton.h>
57 
58 namespace Nektar
59 {
60  namespace LibUtilities
61  {
62  // Register all points and basis creators.
63  namespace
64  {
65  const bool gaussInited1 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussLegendre), GaussPoints::Create);
66  const bool gaussInited2 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMLegendre), GaussPoints::Create);
67  const bool gaussInited3 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPLegendre), GaussPoints::Create);
68  const bool gaussInited4 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoLegendre), GaussPoints::Create);
69  const bool gaussInited5 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussChebyshev), GaussPoints::Create);
70  const bool gaussInited6 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMChebyshev), GaussPoints::Create);
71  const bool gaussInited7 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPChebyshev), GaussPoints::Create);
72  const bool gaussInited8 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoChebyshev), GaussPoints::Create);
73  const bool gaussInited9 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta1), GaussPoints::Create);
74  const bool gaussInited10 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta2), GaussPoints::Create);
75  const bool gaussInited11 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha1Beta0), GaussPoints::Create);
76  const bool gaussInited12 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha2Beta0), GaussPoints::Create);
77  const bool gaussInited13 = PointsManager().RegisterCreator(PointsKey(0, eGaussKronrodLegendre), GaussPoints::Create);
78  const bool gaussInited14 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMLegendre), GaussPoints::Create);
79  const bool gaussInited15 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMAlpha1Beta0),GaussPoints::Create);
80  const bool gaussInited16 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoKronrodLegendre), GaussPoints::Create);
81 
82  const bool fourierInited1 = PointsManager().RegisterCreator(PointsKey(0, eFourierEvenlySpaced), FourierPoints::Create);
83  const bool fourierInited2 = PointsManager().RegisterCreator(PointsKey(0, eFourierSingleModeSpaced), FourierSingleModePoints::Create);
84 
85  const bool BLInited1 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPoints), BLPoints::Create);
86  const bool BLInited2 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPointsRev), BLPoints::Create);
87 
88  const bool polyeInited1 = PointsManager().RegisterCreator(PointsKey(0, ePolyEvenlySpaced), PolyEPoints::Create);
89 
90  const bool NodalTriInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriElec), NodalTriElec::Create);
91  const bool NodalTriInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriFekete), NodalTriFekete::Create);
92  const bool NodalTriInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriSPI), NodalTriSPI::Create);
93  const bool NodalTriInited4 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriEvenlySpaced), NodalTriEvenlySpaced::Create);
94 
95  const bool NodalQuadInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalQuadElec), NodalQuadElec::Create);
96 
97  const bool NodalTetInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetElec), NodalTetElec::Create);
98  const bool NodalTetInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetSPI), NodalTetSPI::Create);
99  const bool NodalTetInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalTetEvenlySpaced), NodalTetEvenlySpaced::Create);
100 
101  const bool NodalPrismInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismEvenlySpaced), NodalPrismEvenlySpaced::Create);
102  const bool NodalPrismInited2 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismElec), NodalPrismElec::Create);
103  const bool NodalPrismInited3 = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismSPI), NodalPrismSPI::Create);
104 
105  const bool NodalHexInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalHexElec), NodalHexElec::Create);
106 
107  const bool Basis_Inited = BasisManager().RegisterGlobalCreator(Basis::Create);
108  };
109 
111  {
112  return Loki::SingletonHolder<PointsManagerT>::Instance();
113  }
114 
116  {
117  return Loki::SingletonHolder<BasisManagerT>::Instance();
118  }
119 
120  } // end of namespace LibUtilities
121 } // end of namespace Nektar
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:62
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:54
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:51
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Gauss-Kronrod-Legendre quadrature points
Definition: PointsType.h:61
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
Definition: PointsType.h:78
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:49
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:59
1D Gauss-Radau-Kronrod-Legendre pinned at x=-1,
Definition: PointsType.h:63
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
BasisManagerT & BasisManager(void)
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:65
1D Lobatto Kronrod quadrature points
Definition: PointsType.h:64
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:66
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
bool RegisterCreator(typename boost::call_traits< KeyType >::const_reference 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:161
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:74
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:55
PointsManagerT & PointsManager(void)
static boost::shared_ptr< Points< NekDouble > > Create(const PointsKey &pkey)
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:53
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:73
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:71
1D power law distribution for boundary layer points
Definition: PointsType.h:69
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Definition: NodalTriSPI.cpp:99
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Definition: BLPoints.cpp:103
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Non Evenly-spaced points for Single Mode analysis
Definition: PointsType.h:67
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:60
bool RegisterGlobalCreator(const CreateFuncType &createFunc)
Register the Global Create Function. The return value is just to facilitate calling statically...
Definition: NekManager.hpp:171
1D power law distribution for boundary layer points
Definition: PointsType.h:68
3D Evenly-spaced points on a Prism
Definition: PointsType.h:75
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:72
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:58
static boost::shared_ptr< Basis > Create(const BasisKey &bkey)
Returns a new instance of a Basis with given BasisKey.
Definition: Basis.cpp:102
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:57
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:52
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:70
3D electrostatically spaced points on a Prism
Definition: PointsType.h:76
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:50
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:77
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:56