35 #ifndef NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_IMPLICIT_TIME_INTEGRATION_SCHEME_SDC
36 #define NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_IMPLICIT_TIME_INTEGRATION_SCHEME_SDC
38 #define LUE LIB_UTILITIES_EXPORT
47 namespace LibUtilities
53 std::vector<NekDouble> freeParams)
56 ASSERTL0(variant ==
"GaussRadauLegendre",
57 "only GaussRadauLegendre variant "
58 "(quadrature) type available for ImplicitSDC");
60 "Spectral Deferred Correction Time integration "
61 "scheme bad parameter numbers (> 0.0): " +
62 std::to_string(freeParams[0]));
64 m_name =
"ImplicitSpectralDeferredCorrection";
69 std::string variant,
unsigned int order,
70 std::vector<NekDouble> freeParams)
74 variant, order, freeParams);
142 for (
unsigned int n = 0; n <
m_nQuadPts - 1; ++n)
150 for (
unsigned int i = 0; i <
m_nvars; ++i)
166 unsigned int kstart = 1;
167 for (
unsigned int k = kstart; k <
m_order; ++k)
173 for (
unsigned int n = 0; n <
m_nQuadPts - 1; ++n)
178 for (
unsigned int i = 0; i <
m_nvars; ++i)
195 for (
unsigned int i = 0; i <
m_nvars; ++i)
#define ASSERTL0(condition, msg)
virtual LUE void v_InitializeScheme(const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override
Worker method to initialize the integration scheme.
virtual LUE void v_SDCIterationLoop(const NekDouble &delta_t, const TimeIntegrationSchemeOperators &op) override
Worker method to compute the SDC iteration.
virtual LUE void v_ResidualEval(const NekDouble &delta_t, const int n, const TimeIntegrationSchemeOperators &op) override
Worker method to compute the residual.
ImplicitTimeIntegrationSchemeSDC(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
virtual LUE void v_ComputeInitialGuess(const NekDouble &delta_t, const TimeIntegrationSchemeOperators &op) override
Worker method to compute the initial SDC guess.
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static std::string className
Binds a set of functions for use by time integration schemes.
void DoImplicitSolve(InArrayType &inarray, OutArrayType &outarray, const NekDouble time, const NekDouble lambda) const
void DoOdeRhs(InArrayType &inarray, OutArrayType &outarray, const NekDouble time) const
Class for spectral deferred correction integration.
LUE void UpdateIntegratedResidual(const NekDouble &delta_t, const int option=0)
Worker method that compute the integrated flux.
TripleArray m_Fint
Array corresponding to the stage Derivatives.
TimeIntegrationSchemeType m_schemeType
TripleArray m_F
Array containing the stage values.
virtual LUE void v_InitializeScheme(const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override
Worker method to initialize the integration scheme.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
@ eImplicit
Fully implicit scheme.
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
The above copyright notice and this permission notice shall be included.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.