Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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>
51 
52 namespace Nektar
53 {
54  namespace LibUtilities
55  {
56  // Register all points and basis creators.
57  namespace
58  {
59  const bool gaussInited1 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussLegendre), GaussPoints::Create);
60  const bool gaussInited2 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMLegendre), GaussPoints::Create);
61  const bool gaussInited3 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPLegendre), GaussPoints::Create);
62  const bool gaussInited4 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoLegendre), GaussPoints::Create);
63  const bool gaussInited5 = PointsManager().RegisterCreator(PointsKey(0, eGaussGaussChebyshev), GaussPoints::Create);
64  const bool gaussInited6 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMChebyshev), GaussPoints::Create);
65  const bool gaussInited7 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauPChebyshev), GaussPoints::Create);
66  const bool gaussInited8 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoChebyshev), GaussPoints::Create);
67  const bool gaussInited9 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta1), GaussPoints::Create);
68  const bool gaussInited10 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha0Beta2), GaussPoints::Create);
69  const bool gaussInited11 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha1Beta0), GaussPoints::Create);
70  const bool gaussInited12 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauMAlpha2Beta0), GaussPoints::Create);
71 
72  const bool gaussInited13 = PointsManager().RegisterCreator(PointsKey(0, eGaussKronrodLegendre), GaussPoints::Create);
73  const bool gaussInited14 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMLegendre), GaussPoints::Create);
74  const bool gaussInited15 = PointsManager().RegisterCreator(PointsKey(0, eGaussRadauKronrodMAlpha1Beta0), GaussPoints::Create);
75  const bool gaussInited16 = PointsManager().RegisterCreator(PointsKey(0, eGaussLobattoKronrodLegendre), GaussPoints::Create);
76 
77  const bool fourierInited0 = PointsManager().RegisterCreator(PointsKey(0, eFourierEvenlySpaced), FourierPoints::Create);
78  const bool fourierInitedSM0 = PointsManager().RegisterCreator(PointsKey(0, eFourierSingleModeSpaced), FourierSingleModePoints::Create);
79  const bool BLInited0 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPoints), BLPoints::Create);
80  const bool BLInited1 = PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPointsRev), BLPoints::Create);
81  const bool polyeInited10 = PointsManager().RegisterCreator(PointsKey(0, ePolyEvenlySpaced), PolyEPoints::Create);
82  const bool NodalTriInited0 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriElec), NodalTriElec::Create);
83  const bool NodalTriInited1 = PointsManager().RegisterCreator(PointsKey(0, eNodalTriFekete), NodalTriFekete::Create);
84  const bool nodalTetElecInited = PointsManager().RegisterCreator(PointsKey(0, eNodalTetElec), NodalTetElec::Create);
85  const bool NodalTriEveInited = PointsManager().RegisterCreator(PointsKey(0, eNodalTriEvenlySpaced), NodalTriEvenlySpaced::Create);
86  const bool NodalTetEveInited = PointsManager().RegisterCreator(PointsKey(0, eNodalTetEvenlySpaced), NodalTetEvenlySpaced::Create);
87  const bool NodalPrismEveInited = PointsManager().RegisterCreator(PointsKey(0, eNodalPrismEvenlySpaced), NodalPrismEvenlySpaced::Create);
88 
89  const bool Basis_Inited = BasisManager().RegisterGlobalCreator(Basis::Create);
90  };
91 
93  {
94  return Loki::SingletonHolder<PointsManagerT>::Instance();
95  }
96 
98  {
99  return Loki::SingletonHolder<BasisManagerT>::Instance();
100  }
101 
102  } // end of namespace LibUtilities
103 } // end of namespace Nektar
104 
105 
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:60
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:52
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:49
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
1D Gauss-Kronrod-Legendre quadrature points
Definition: PointsType.h:59
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:47
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:57
1D Gauss-Radau-Kronrod-Legendre pinned at x=-1,
Definition: PointsType.h:61
BasisManagerT & BasisManager(void)
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:63
1D Lobatto Kronrod quadrature points
Definition: PointsType.h:62
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:64
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:72
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:53
PointsManagerT & PointsManager(void)
static boost::shared_ptr< Points< NekDouble > > Create(const PointsKey &pkey)
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:51
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:71
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:69
1D power law distribution for boundary layer points
Definition: PointsType.h:67
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:65
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:58
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:66
3D Evenly-spaced points on a Prism
Definition: PointsType.h:73
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:70
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:56
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:55
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:50
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:68
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:48
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:54