40 namespace LibUtilities
104 boost::ignore_unused(op);
105 boost::ignore_unused(deltaT);
109 for (
unsigned int i = 0; i <
m_nvars; ++i)
132 for (
unsigned int m = 0; m <=
m_order; ++m)
136 for (
unsigned int i = 0; i <
m_nvars; ++i)
154 for (
unsigned int m = 0; m < nodes; ++m)
159 for (
unsigned int i = 0; i <
m_nvars; ++i)
171 for (
unsigned int i = 0; i <
m_nvars; ++i)
185 const int timestep,
const NekDouble delta_t,
189 boost::ignore_unused(timestep);
203 for (
unsigned int m = 1; m <=
m_order; ++m)
205 for (
unsigned int k = 1; k <= m; ++k)
211 m_time + k * (delta_t / m), delta_t / m);
221 for (
unsigned int i = 0; i <
m_nvars; ++i)
224 m_Y[k - 1][i], 1,
m_Y[k][i], 1);
231 m_time + (k - 1) * (delta_t / m));
232 for (
unsigned int i = 0; i <
m_nvars; ++i)
235 m_Y[k - 1][i], 1,
m_Y[k][i], 1);
248 m_time + k * (delta_t / m), delta_t / m);
253 for (
unsigned int i = 0; i <
m_nvars; ++i)
262 for (
unsigned int i = 0; i <
m_nvars; ++i)
271 for (
unsigned int m = 1; m <
m_order; ++m)
274 for (
unsigned int k = m; k <
m_order; ++k)
276 for (
unsigned int i = 0; i <
m_nvars; ++i)
281 (k - m + 1.0) / ((k + 1.0) - (k - m + 1.0)),
287 for (
unsigned int k = m; k <
m_order; ++k)
289 for (
unsigned int i = 0; i <
m_nvars; ++i)
297 for (
unsigned int i = 0; i <
m_nvars; ++i)
306 for (
unsigned int m = 1; m <=
m_order / 2; ++m)
311 for (
unsigned int k = 1; k <= m; ++k)
314 m_time + (k - 1 + 0.25) * (delta_t / m),
316 for (
unsigned int i = 0; i <
m_nvars; ++i)
319 -1.0,
m_Y[2 * k - 2][i], 1,
323 m_time + (k - 0.25) * (delta_t / m),
325 for (
unsigned int i = 0; i <
m_nvars; ++i)
330 1,
m_Y[2 * k][i], 1);
339 for (
unsigned int i = 0; i <
m_nvars; ++i)
342 m_Y[0][i], 1,
m_Y[1][i], 1);
347 for (
unsigned int k = 2; k <= 2 * m; ++k)
350 m_time + (k - 1) * (delta_t / (2 * m)));
351 for (
unsigned int i = 0; i <
m_nvars; ++i)
354 m_Y[k - 2][i], 1,
m_Y[k][i], 1);
357 m_time + k * (delta_t / (2 * m)));
362 for (
unsigned int i = 0; i <
m_nvars; ++i)
371 for (
unsigned int i = 0; i <
m_nvars; ++i)
380 for (
unsigned int m = 1; m <
m_order / 2; ++m)
383 for (
unsigned int k = m; k <
m_order / 2; ++k)
385 for (
unsigned int i = 0; i <
m_nvars; ++i)
391 std::pow(k - m + 1.0, 2) /
392 (std::pow(k + 1.0, 2) - std::pow(k - m + 1.0, 2)),
398 for (
unsigned int k = m; k <
m_order / 2; ++k)
400 for (
unsigned int i = 0; i <
m_nvars; ++i)
408 for (
unsigned int i = 0; i <
m_nvars; ++i)
424 os <<
"Time Integration Scheme: " <<
GetFullName() << std::endl;
429 os <<
"Time Integration Scheme: " <<
GetFullName() << std::endl;
Class for spectral deferred correction integration.
virtual LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override
int m_nvars
Array corresponding to the stage Derivatives.
virtual LUE ConstDoubleArray & v_TimeIntegrate(const int timestep, const NekDouble delta_t, const TimeIntegrationSchemeOperators &op) override
Worker method that performs the time integration.
virtual LUE NekDouble v_GetTimeStability() const override
virtual LUE void v_printFull(std::ostream &os) const override
virtual LUE std::string v_GetName() const override
virtual const TripleArray & v_GetSolutionVector() const override
Gets the solution vector of the ODE.
virtual LUE unsigned int v_GetNumIntegrationPhases() const override
virtual LUE void v_print(std::ostream &os) const override
Worker method to print details on the integration scheme.
DoubleArray m_F
Array containing the solution values.
TripleArray m_T
Array containing the stage values.
virtual void v_SetSolutionVector(const int Offset, const DoubleArray &y) override
Sets the solution vector of the ODE.
DoubleArray m_F0
Array corresponding to the stage Derivatives.
TripleArray m_T0
Array containing the solution values.
virtual LUE unsigned int v_GetOrder() const override
std::vector< NekDouble > m_freeParams
virtual LUE std::vector< NekDouble > v_GetFreeParams() const override
virtual LUE std::string v_GetVariant() const override
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.
TimeIntegrationSchemeType m_schemeType
LUE void print(std::ostream &os) const
LUE std::string GetFullName() const
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 DoProjection(InArrayType &inarray, OutArrayType &outarray, const NekDouble time) const
void DoOdeRhs(InArrayType &inarray, OutArrayType &outarray, const NekDouble time) const
AT< AT< NekDouble > > DoubleArray
AT< NekDouble > SingleArray
TimeIntegrationSchemeType
AT< AT< AT< NekDouble > > > TripleArray
std::shared_ptr< TimeIntegrationSchemeGEM > TimeIntegrationSchemeGEMSharedPtr
std::ostream & operator<<(std::ostream &os, const BasisKey &rhs)
The above copyright notice and this permission notice shall be included.
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
svtvvtp (scalar times vector plus scalar times vector):
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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.