41 #ifndef NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_AM_TIME_INTEGRATION_SCHEME
42 #define NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_AM_TIME_INTEGRATION_SCHEME
44 #define LUE LIB_UTILITIES_EXPORT
54 namespace LibUtilities
64 std::vector<NekDouble> freeParams)
69 "AdamsMoulton Time integration scheme bad order (1-4): " +
70 std::to_string(order));
74 for (
unsigned int n = 0; n < order; ++n)
120 "AdamsMoulton Time integration scheme bad order: " +
121 std::to_string(order));
130 std::string variant,
unsigned int order,
131 std::vector<NekDouble> freeParams)
135 variant, order, freeParams);
149 { { 0., 0., 0., 0. },
153 { 1./ 2., 1./ 2., 0., 0. },
155 { 5./12., 8./12., -1./12., 0. },
157 { 9./24., 19./24., -5./24., 1./24. } };
161 phase->m_order = order;
163 std::string(
"AdamsMoultonOrder" + std::to_string(phase->m_order));
165 phase->m_numsteps = phase->m_order;
166 phase->m_numstages = 1;
186 phase->m_A[0][0][0] = coefficients[phase->m_order][0];
187 phase->m_B[0][0][0] = coefficients[phase->m_order][0];
190 if (phase->m_order > 1)
192 phase->m_B[0][1][0] = 1.0;
196 phase->m_U[0][0] = 1.0;
197 phase->m_V[0][0] = 1.0;
200 for (
int n = 1; n < phase->m_order; ++n)
202 phase->m_U[0][n] = coefficients[phase->m_order][n];
203 phase->m_V[0][n] = coefficients[phase->m_order][n];
207 for (
int n = 2; n < phase->m_order; ++n)
209 phase->m_V[n][n - 1] = 1.0;
212 phase->m_numMultiStepValues = 1;
213 phase->m_numMultiStepDerivs = phase->m_order - 1;
215 phase->m_timeLevelOffset[0] = 0;
218 for (
int n = 1; n < phase->m_order; ++n)
220 phase->m_timeLevelOffset[n] = n - 1;
223 phase->CheckAndVerify();
229 return std::string(
"AdamsMoulton");
247 std::vector<NekDouble> freeParams)
250 boost::ignore_unused(variant);
251 boost::ignore_unused(order);
255 std::string variant,
unsigned int order,
256 std::vector<NekDouble> freeParams)
258 boost::ignore_unused(variant);
259 boost::ignore_unused(order);
278 std::vector<NekDouble> freeParams)
281 boost::ignore_unused(variant);
282 boost::ignore_unused(order);
286 std::string variant,
unsigned int order,
287 std::vector<NekDouble> freeParams)
289 boost::ignore_unused(variant);
290 boost::ignore_unused(order);
309 std::vector<NekDouble> freeParams)
312 boost::ignore_unused(variant);
313 boost::ignore_unused(order);
317 std::string variant,
unsigned int order,
318 std::vector<NekDouble> freeParams)
320 boost::ignore_unused(variant);
321 boost::ignore_unused(order);
340 std::vector<NekDouble> freeParams)
343 boost::ignore_unused(variant);
344 boost::ignore_unused(order);
348 std::string variant,
unsigned int order,
349 std::vector<NekDouble> freeParams)
351 boost::ignore_unused(variant);
352 boost::ignore_unused(order);
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
static std::string className
AdamsMoultonOrder1TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static std::string className
AdamsMoultonOrder2TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
AdamsMoultonOrder3TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static std::string className
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static std::string className
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
AdamsMoultonOrder4TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static std::string className
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, int order)
virtual LUE NekDouble v_GetTimeStability() const override
AdamsMoultonTimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
virtual ~AdamsMoultonTimeIntegrationScheme()
virtual LUE std::string v_GetName() const override
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, unsigned int order)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, std::string variant)
Base class for GLM time integration schemes.
TimeIntegrationAlgorithmGLMVector m_integration_phases
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< TimeIntegrationAlgorithmGLM > TimeIntegrationAlgorithmGLMSharedPtr
@ eDiagonallyImplicit
Diagonally implicit scheme (e.g. the DIRK schemes)
std::vector< TimeIntegrationAlgorithmGLMSharedPtr > TimeIntegrationAlgorithmGLMVector
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
The above copyright notice and this permission notice shall be included.