Abstract class for solving systems of ODEs: dx/dt = f(x,t)
Definition at line 22 of file ode.hpp.
virtual void mfem::ODESolver::Step |
( |
Vector & |
x, |
|
|
double & |
t, |
|
|
double & |
dt |
|
) |
| |
|
pure virtual |
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.
Implemented in mfem::PetscODESolver, mfem::ARKStepSolver, mfem::CVODESSolver, mfem::GeneralizedAlphaSolver, mfem::ESDIRK33Solver, mfem::ESDIRK32Solver, mfem::TrapezoidalRuleSolver, mfem::SDIRK33Solver, mfem::CVODESolver, mfem::SDIRK34Solver, mfem::SDIRK23Solver, mfem::ImplicitMidpointSolver, mfem::BackwardEulerSolver, mfem::AdamsMoultonSolver, mfem::AdamsBashforthSolver, mfem::ExplicitRKSolver, mfem::RK4Solver, mfem::RK3SSPSolver, mfem::RK2Solver, and mfem::ForwardEulerSolver.