MFEM  v3.4
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::ExplicitRKSolver Class Reference

#include <ode.hpp>

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

Public Member Functions

 ExplicitRKSolver (int _s, const double *_a, const double *_b, const double *_c)
 
virtual void Init (TimeDependentOperator &_f)
 Associate a TimeDependentOperator with the ODE solver. More...
 
virtual void Step (Vector &x, double &t, double &dt)
 Perform a time step from time t [in] to time t [out] based on the requested step size dt [in]. More...
 
virtual ~ExplicitRKSolver ()
 
- 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 ~ODESolver ()
 

Additional Inherited Members

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

Detailed Description

An explicit Runge-Kutta method corresponding to a general Butcher tableau +-----—+-------------------—+ | c[0] | a[0] | | c[1] | a[1] a[2] | | ... | ... | | c[s-2] | ... a[s(s-1)/2-1] | +-----—+-------------------—+ | | b[0] b[1] ... b[s-1] | +-----—+-------------------—+

Definition at line 168 of file ode.hpp.

Constructor & Destructor Documentation

mfem::ExplicitRKSolver::ExplicitRKSolver ( int  _s,
const double *  _a,
const double *  _b,
const double *  _c 
)

Definition at line 132 of file ode.cpp.

mfem::ExplicitRKSolver::~ExplicitRKSolver ( )
virtual

Definition at line 183 of file ode.cpp.

Member Function Documentation

void mfem::ExplicitRKSolver::Init ( TimeDependentOperator f)
virtual

Associate a TimeDependentOperator with the ODE solver.

This method has to be called:

Reimplemented from mfem::ODESolver.

Definition at line 142 of file ode.cpp.

void mfem::ExplicitRKSolver::Step ( Vector x,
double &  t,
double &  dt 
)
virtual

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

Parameters
[in,out]xApproximate solution.
[in,out]tTime associated with the approximate solution x.
[in,out]dtTime 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 153 of file ode.cpp.


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