Nektar++
SchemeInitializer.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: SchemeInitializer.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: This file isused to add each of the Time Integration Schemes
33 // to the NekFactory.
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
41 
48 
50 
52 
54 
58 
60 
61 namespace Nektar
62 {
63 namespace LibUtilities
64 {
65 
66 // Register all the schemes with the Time Integration Scheme Factory...
67 //
68 #define REGISTER(scheme) \
69  std::string scheme##TimeIntegrationScheme::className = \
70  GetTimeIntegrationSchemeFactory().RegisterCreatorFunction( \
71  #scheme, scheme##TimeIntegrationScheme::create)
72 
73 // AdamsBashforthTimeIntegrationSchemes.h
74 REGISTER(AdamsBashforth);
75 REGISTER(AdamsBashforthOrder1);
76 REGISTER(AdamsBashforthOrder2);
77 REGISTER(AdamsBashforthOrder3);
78 REGISTER(AdamsBashforthOrder4);
79 
80 // AdamsMoultonTimeIntegrationSchemes.h
81 REGISTER(AdamsMoulton);
82 REGISTER(AdamsMoultonOrder1);
83 REGISTER(AdamsMoultonOrder2);
84 REGISTER(AdamsMoultonOrder3);
85 REGISTER(AdamsMoultonOrder4);
86 
87 // BDFImplicitTimeIntegrationSchemes.h
88 REGISTER(BDFImplicit);
89 REGISTER(BDFImplicitOrder1);
90 REGISTER(BDFImplicitOrder2);
91 REGISTER(BDFImplicitOrder3);
92 REGISTER(BDFImplicitOrder4);
93 
94 // EulerTimeIntegrationSchemes.h
95 REGISTER(Euler);
96 REGISTER(BackwardEuler);
97 REGISTER(ForwardEuler);
98 
99 // FITTimeIntegrationSchemes.h
100 REGISTER(EulerExponential);
101 
102 // TimeIntegrationSchemesFIT.h
105  "FractionalInTime", FractionalInTimeIntegrationScheme::create);
106 
107 // CNABTimeIntegrationScheme.h
108 REGISTER(CNAB);
109 
110 // DIRKTimeIntegrationSchemes.h
111 REGISTER(DIRK);
112 REGISTER(DIRKOrder1);
113 REGISTER(DIRKOrder2);
114 REGISTER(DIRKOrder3);
115 REGISTER(DIRKOrder3_ES5);
116 REGISTER(DIRKOrder4_ES6);
117 
118 // IMEXdirkTimeIntegrationSchemes.h
119 REGISTER(IMEXdirk);
120 REGISTER(IMEXdirk_1_1_1);
121 REGISTER(IMEXdirk_1_2_1);
122 REGISTER(IMEXdirk_1_2_2);
123 REGISTER(IMEXdirk_2_2_2);
124 REGISTER(IMEXdirk_2_3_2);
125 REGISTER(IMEXdirk_2_3_3);
126 REGISTER(IMEXdirk_3_4_3);
127 REGISTER(IMEXdirk_4_4_3);
128 
129 // IMEXGearTimeIntegrationScheme.h
130 REGISTER(IMEXGear);
131 
132 // IMEXTimeIntegrationSchemes.h
133 REGISTER(IMEX);
134 REGISTER(IMEXOrder1);
135 REGISTER(IMEXOrder2);
136 REGISTER(IMEXOrder3);
137 REGISTER(IMEXOrder4);
138 
139 // MCNABTimeIntegrationScheme.h
140 REGISTER(MCNAB);
141 
142 // RungeKuttaTimeIntegrationSchemes.h
143 REGISTER(RungeKutta);
144 REGISTER(RungeKutta1);
145 REGISTER(RungeKutta2);
146 REGISTER(RungeKutta2_ImprovedEuler);
147 REGISTER(RungeKutta2_SSP);
148 REGISTER(RungeKutta3);
149 REGISTER(RungeKutta3_SSP);
150 REGISTER(ClassicalRungeKutta4);
151 REGISTER(RungeKutta4);
152 REGISTER(RungeKutta5);
153 
154 // TimeIntegrationSchemesSDC.h
164 
165 // TimeIntegrationSchemesGEM.h
168  "ExtrapolationMethod", TimeIntegrationSchemeGEM::create);
169 
170 } // end namespace LibUtilities
171 } // namespace Nektar
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
Creator.
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:198
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
REGISTER(AdamsBashforth)
TimeIntegrationSchemeFactory & GetTimeIntegrationSchemeFactory()
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2