35#ifndef NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_TIME_INTEGRATION_SCHEME_GEM
36#define NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_TIME_INTEGRATION_SCHEME_GEM
38#define LUE LIB_UTILITIES_EXPORT
54 std::vector<NekDouble> freeParams)
56 m_name(
"ExtrapolationMethod")
58 ASSERTL0(variant ==
"" || variant ==
"ExplicitEuler" ||
59 variant ==
"ImplicitEuler" || variant ==
"IMEXEuler" ||
60 variant ==
"ExplicitMidpoint" ||
61 variant ==
"ImplicitMidpoint",
62 "Extrapolation Time integration "
63 "scheme bad variant (ExplicitEuler, ImplicitEuler, "
66 if (variant ==
"IMEXEuler")
68 std::cerr <<
"WARNING: IMEX Euler extrapolation method has been "
69 "implemented but its use is not recommended as the "
70 "approach is affected by order-reduction problems."
74 if (variant ==
"" || variant ==
"ExplicitEuler" ||
75 variant ==
"ImplicitEuler" || variant ==
"IMEXEuler")
77 ASSERTL0(order >= 1,
"Extrapolation Time integration "
78 "scheme bad order numbers (>=1): " +
79 std::to_string(order));
81 else if (variant ==
"ExplicitMidpoint" || variant ==
"ImplicitMidpoint")
83 ASSERTL0(order >= 2,
"Extrapolation Time integration "
84 "scheme bad order numbers (>=2): " +
85 std::to_string(order));
88 "Extrapolation Time integration "
89 "scheme bad order numbers (even number): " +
90 std::to_string(order));
96 if (variant ==
"ExplicitEuler" || variant ==
"ExplicitMidpoint")
100 else if (variant ==
"ImplicitEuler" || variant ==
"ImplicitMidpoint")
104 else if (variant ==
"IMEXEuler")
116 std::string variant,
size_t order, std::vector<NekDouble> freeParams)
120 variant, order, freeParams);
144 LUE void v_print(std::ostream &os)
const override;
#define ASSERTL0(condition, msg)
Class for spectral deferred correction integration.
LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override
LUE NekDouble v_GetTimeStability() const override
static TimeIntegrationSchemeSharedPtr create(std::string variant, size_t order, std::vector< NekDouble > freeParams)
LUE void v_printFull(std::ostream &os) const override
static std::string className
LUE size_t v_GetNumIntegrationPhases() const override
LUE void v_SetSolutionVector(const size_t Offset, const DoubleArray &y) override
LUE std::string v_GetName() const override
LUE const TripleArray & v_GetSolutionVector() const override
LUE void v_print(std::ostream &os) const override
Worker method to print details on the integration scheme.
TimeIntegrationSchemeGEM(std::string variant, size_t order, std::vector< NekDouble > freeParams)
TimeIntegrationSchemeOperators m_op
LUE TripleArray & v_UpdateSolutionVector() override
DoubleArray m_F
Array containing the solution values.
size_t m_order
Array corresponding to the stage Derivatives.
TripleArray m_T
Array containing the stage values.
DoubleArray m_F0
Array corresponding to the stage Derivatives.
LUE size_t v_GetOrder() const override
~TimeIntegrationSchemeGEM() override
Destructor.
TripleArray m_T0
Array containing the solution values.
LUE ConstDoubleArray & v_TimeIntegrate(const size_t timestep, const NekDouble delta_t) override
Worker method that performs the time integration.
std::vector< NekDouble > m_freeParams
LUE std::vector< NekDouble > v_GetFreeParams() const override
LUE std::string v_GetVariant() const override
LUE void v_InitializeScheme(const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override
Worker method to initialize the integration scheme.
TimeIntegrationSchemeType m_schemeType
Base class for time integration schemes.
Binds a set of functions for use by time integration schemes.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
TimeIntegrationSchemeType
@ eImplicit
Fully implicit scheme.
@ eExplicit
Formally explicit scheme.
@ eIMEX
Implicit Explicit General Linear Method.
@ eNoTimeIntegrationSchemeType
std::shared_ptr< TimeIntegrationSchemeGEM > TimeIntegrationSchemeGEMSharedPtr
std::ostream & operator<<(std::ostream &os, const BasisKey &rhs)
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr