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
46#include <boost/core/ignore_unused.hpp>
61 std::vector<NekDouble> freeParams)
66 "AdamsMoulton Time integration scheme bad order (1-4): " +
67 std::to_string(order));
71 for (
size_t n = 0; n < order; ++n)
116 "AdamsMoulton Time integration scheme bad order: " +
117 std::to_string(order));
126 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
130 variant, order, freeParams);
142 { { 0., 0., 0., 0. },
146 { 1./ 2., 1./ 2., 0., 0. },
148 { 5./12., 8./12., -1./12., 0. },
150 { 9./24., 19./24., -5./24., 1./24. } };
154 phase->m_order = order;
156 std::string(
"AdamsMoultonOrder" + std::to_string(phase->m_order));
158 phase->m_numsteps = phase->m_order;
159 phase->m_numstages = 1;
176 phase->m_A[0][0][0] = coefficients[phase->m_order][0];
177 phase->m_B[0][0][0] = coefficients[phase->m_order][0];
180 if (phase->m_order > 1)
182 phase->m_B[0][1][0] = 1.0;
186 phase->m_U[0][0] = 1.0;
187 phase->m_V[0][0] = 1.0;
190 for (
size_t n = 1; n < phase->m_order; ++n)
192 phase->m_U[0][n] = coefficients[phase->m_order][n];
193 phase->m_V[0][n] = coefficients[phase->m_order][n];
197 for (
size_t n = 2; n < phase->m_order; ++n)
199 phase->m_V[n][n - 1] = 1.0;
202 phase->m_numMultiStepValues = 1;
203 phase->m_numMultiStepImplicitDerivs = phase->m_order - 1;
204 phase->m_numMultiStepExplicitDerivs = 0;
206 phase->m_timeLevelOffset[0] = 0;
209 for (
size_t n = 1; n < phase->m_order; ++n)
211 phase->m_timeLevelOffset[n] = n - 1;
214 phase->CheckAndVerify();
220 return std::string(
"AdamsMoulton");
237 std::vector<NekDouble> freeParams)
240 boost::ignore_unused(variant, order);
244 [[maybe_unused]] std::string variant, [[maybe_unused]]
size_t order,
245 std::vector<NekDouble> freeParams)
266 std::vector<NekDouble> freeParams)
269 boost::ignore_unused(variant, order);
273 [[maybe_unused]] std::string variant, [[maybe_unused]]
size_t order,
274 std::vector<NekDouble> freeParams)
295 std::vector<NekDouble> freeParams)
298 boost::ignore_unused(variant, order);
302 [[maybe_unused]] std::string variant, [[maybe_unused]]
size_t order,
303 std::vector<NekDouble> freeParams)
324 std::vector<NekDouble> freeParams)
327 boost::ignore_unused(variant, order);
331 [[maybe_unused]] std::string variant, [[maybe_unused]]
size_t order,
332 std::vector<NekDouble> freeParams)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string TimeIntegrationMethodLookupId
AdamsMoultonOrder1TimeIntegrationScheme(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string className
static std::string className
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
AdamsMoultonOrder2TimeIntegrationScheme(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string TimeIntegrationMethodLookupId
static std::string className
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string TimeIntegrationMethodLookupId
AdamsMoultonOrder3TimeIntegrationScheme(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string className
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
AdamsMoultonOrder4TimeIntegrationScheme(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static std::string TimeIntegrationMethodLookupId
AdamsMoultonTimeIntegrationScheme(std::string variant, size_t order, std::vector< NekDouble > freeParams)
LUE NekDouble v_GetTimeStability() const override
static std::string className
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, size_t order)
LUE std::string v_GetName() const override
~AdamsMoultonTimeIntegrationScheme() override
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, size_t order)
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