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);
144 return std::string(
"AdamsMoulton");
159 { { 0., 0., 0., 0. },
163 { 1./ 2., 1./ 2., 0., 0. },
165 { 5./12., 8./12., -1./12., 0. },
167 { 9./24., 19./24., -5./24., 1./24. } };
171 phase->m_order = order;
173 std::string(
"AdamsMoultonOrder" + std::to_string(phase->m_order));
175 phase->m_numsteps = phase->m_order;
176 phase->m_numstages = 1;
196 phase->m_A[0][0][0] = coefficients[phase->m_order][0];
197 phase->m_B[0][0][0] = coefficients[phase->m_order][0];
200 if (phase->m_order > 1)
202 phase->m_B[0][1][0] = 1.0;
206 phase->m_U[0][0] = 1.0;
207 phase->m_V[0][0] = 1.0;
210 for (
int n = 1; n < phase->m_order; ++n)
212 phase->m_U[0][n] = coefficients[phase->m_order][n];
213 phase->m_V[0][n] = coefficients[phase->m_order][n];
217 for (
int n = 2; n < phase->m_order; ++n)
219 phase->m_V[n][n - 1] = 1.0;
222 phase->m_numMultiStepValues = 1;
223 phase->m_numMultiStepDerivs = phase->m_order - 1;
225 phase->m_timeLevelOffset[0] = 0;
228 for (
int n = 1; n < phase->m_order; ++n)
230 phase->m_timeLevelOffset[n] = n - 1;
233 phase->CheckAndVerify();
246 std::vector<NekDouble> freeParams)
249 boost::ignore_unused(variant);
250 boost::ignore_unused(order);
254 std::string variant,
unsigned int order,
255 std::vector<NekDouble> freeParams)
257 boost::ignore_unused(variant);
258 boost::ignore_unused(order);
277 std::vector<NekDouble> freeParams)
280 boost::ignore_unused(variant);
281 boost::ignore_unused(order);
285 std::string variant,
unsigned int order,
286 std::vector<NekDouble> freeParams)
288 boost::ignore_unused(variant);
289 boost::ignore_unused(order);
308 std::vector<NekDouble> freeParams)
311 boost::ignore_unused(variant);
312 boost::ignore_unused(order);
316 std::string variant,
unsigned int order,
317 std::vector<NekDouble> freeParams)
319 boost::ignore_unused(variant);
320 boost::ignore_unused(order);
339 std::vector<NekDouble> freeParams)
342 boost::ignore_unused(variant);
343 boost::ignore_unused(order);
347 std::string variant,
unsigned int order,
348 std::vector<NekDouble> freeParams)
350 boost::ignore_unused(variant);
351 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)
AdamsMoultonTimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
virtual LUE std::string GetName() const
virtual ~AdamsMoultonTimeIntegrationScheme()
virtual LUE NekDouble GetTimeStability() const
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, std::string variant)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, unsigned int order, std::vector< NekDouble > freeParams)
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.