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
62 std::vector<NekDouble> freeParams)
67 "AdamsMoulton Time integration scheme bad order (1-4): " +
68 std::to_string(order));
72 for (
size_t n = 0; n < order; ++n)
117 "AdamsMoulton Time integration scheme bad order: " +
118 std::to_string(order));
127 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
131 variant, order, freeParams);
143 { { 0., 0., 0., 0. },
147 { 1./ 2., 1./ 2., 0., 0. },
149 { 5./12., 8./12., -1./12., 0. },
151 { 9./24., 19./24., -5./24., 1./24. } };
155 phase->m_order = order;
157 std::string(
"AdamsMoultonOrder" + std::to_string(phase->m_order));
159 phase->m_numsteps = phase->m_order;
160 phase->m_numstages = 1;
177 phase->m_A[0][0][0] = coefficients[phase->m_order][0];
178 phase->m_B[0][0][0] = coefficients[phase->m_order][0];
181 if (phase->m_order > 1)
183 phase->m_B[0][1][0] = 1.0;
187 phase->m_U[0][0] = 1.0;
188 phase->m_V[0][0] = 1.0;
191 for (
size_t n = 1; n < phase->m_order; ++n)
193 phase->m_U[0][n] = coefficients[phase->m_order][n];
194 phase->m_V[0][n] = coefficients[phase->m_order][n];
198 for (
size_t n = 2; n < phase->m_order; ++n)
200 phase->m_V[n][n - 1] = 1.0;
203 phase->m_numMultiStepValues = 1;
204 phase->m_numMultiStepImplicitDerivs = phase->m_order - 1;
205 phase->m_numMultiStepExplicitDerivs = 0;
207 phase->m_timeLevelOffset[0] = 0;
210 for (
size_t n = 1; n < phase->m_order; ++n)
212 phase->m_timeLevelOffset[n] = n - 1;
215 phase->CheckAndVerify();
221 return std::string(
"AdamsMoulton");
238 std::vector<NekDouble> freeParams)
241 boost::ignore_unused(variant);
242 boost::ignore_unused(order);
246 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
248 boost::ignore_unused(variant);
249 boost::ignore_unused(order);
270 std::vector<NekDouble> freeParams)
273 boost::ignore_unused(variant);
274 boost::ignore_unused(order);
278 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
280 boost::ignore_unused(variant);
281 boost::ignore_unused(order);
302 std::vector<NekDouble> freeParams)
305 boost::ignore_unused(variant);
306 boost::ignore_unused(order);
310 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
312 boost::ignore_unused(variant);
313 boost::ignore_unused(order);
334 std::vector<NekDouble> freeParams)
337 boost::ignore_unused(variant);
338 boost::ignore_unused(order);
342 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
344 boost::ignore_unused(variant);
345 boost::ignore_unused(order);
#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)
static std::string className
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, size_t order)
virtual LUE NekDouble v_GetTimeStability() const override
virtual ~AdamsMoultonTimeIntegrationScheme()
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
virtual LUE std::string v_GetName() const override
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
The above copyright notice and this permission notice shall be included.