MFEM  v4.4.0 Finite element discretization library
mfem::SDIRK23Solver Class Reference

#include <ode.hpp>

Inheritance diagram for mfem::SDIRK23Solver:
[legend]
Collaboration diagram for mfem::SDIRK23Solver:
[legend]

## Public Member Functions

SDIRK23Solver (int gamma_opt=1)

void Init (TimeDependentOperator &f_) override
Associate a TimeDependentOperator with the ODE solver. More...

void Step (Vector &x, double &t, double &dt) override
Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]. More...

Public Member Functions inherited from mfem::ODESolver
ODESolver ()

virtual void Run (Vector &x, double &t, double &dt, double tf)
Perform time integration from time t [in] to time tf [in]. More...

virtual int GetMaxStateSize ()
Function for getting and setting the state vectors. More...

virtual int GetStateSize ()

virtual const VectorGetStateVector (int i)

virtual void GetStateVector (int i, Vector &state)

virtual void SetStateVector (int i, Vector &state)

virtual ~ODESolver ()

## Protected Attributes

double gamma

Vector k

Vector y

Protected Attributes inherited from mfem::ODESolver
TimeDependentOperatorf
Pointer to the associated TimeDependentOperator. More...

MemoryType mem_type

## Detailed Description

Two stage, singly diagonal implicit Runge-Kutta (SDIRK) methods; the choices for gamma_opt are: 0 - 3rd order method, not A-stable 1 - 3rd order method, A-stable, not L-stable (default) 2 - 2nd order method, L-stable 3 - 2nd order method, L-stable (has solves outside [t,t+dt]).

Definition at line 422 of file ode.hpp.

## Constructor & Destructor Documentation

 mfem::SDIRK23Solver::SDIRK23Solver ( int gamma_opt = 1 )

Definition at line 571 of file ode.cpp.

## Member Function Documentation

 void mfem::SDIRK23Solver::Init ( TimeDependentOperator & f_ )
overridevirtual

Associate a TimeDependentOperator with the ODE solver.

This method has to be called:

Reimplemented from mfem::ODESolver.

Definition at line 591 of file ode.cpp.

 void mfem::SDIRK23Solver::Step ( Vector & x, double & t, double & dt )
overridevirtual

Perform a time step from time t [in] to time t [out] based on the requested step size dt [in].

Parameters
 [in,out] x Approximate solution. [in,out] t Time associated with the approximate solution x. [in,out] dt Time step size.

The following rules describe the common behavior of the method:

• The input x [in] is the approximate solution for the input time t [in].
• The input dt [in] is the desired time step size, defining the desired target time: t [target] = t [in] + dt [in].
• The output x [out] is the approximate solution for the output time t [out].
• The output dt [out] is the last time step taken by the method which may be smaller or larger than the input dt [in] value, e.g. because of time step control.
• The method may perform more than one time step internally; in this case dt [out] is the last internal time step size.
• The output value of t [out] may be smaller or larger than t [target], however, it is not smaller than t [in] + dt [out], if at least one internal time step was performed.
• The value x [out] may be obtained by interpolation using internally stored data.
• In some cases, the contents of x [in] may not be used, e.g. when x [out] from a previous Step() call was obtained by interpolation.
• In consecutive calls to this method, the output t [out] of one Step() call has to be the same as the input t [in] to the next Step() call.
• If the previous rule has to be broken, e.g. to restart a time stepping sequence, then the ODE solver must be re-initialized by calling Init() between the two Step() calls.

Implements mfem::ODESolver.

Definition at line 598 of file ode.cpp.

## Member Data Documentation

 double mfem::SDIRK23Solver::gamma
protected

Definition at line 425 of file ode.hpp.

 Vector mfem::SDIRK23Solver::k
protected

Definition at line 426 of file ode.hpp.

 Vector mfem::SDIRK23Solver::y
protected

Definition at line 426 of file ode.hpp.

The documentation for this class was generated from the following files: