The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | List of all members
Traum::Rk4< DiffEquation > Class Template Reference

A solver implementing the so called explicit RK4 method, using constant stepsize: y_{n+1} = y_n + h/6( k1 + 2k2 + 2k3 + k4) More...

#include <elementary/ode/Rk4.hpp>

Inheritance diagram for Traum::Rk4< DiffEquation >:
Traum::Integrator< DiffEquation::real > Traum::IntegratorBase

Classes

struct  EvolutionVars
 Set of variables that are updated at each integration step but keep their values from the previous step. More...
 
struct  OutputVars
 Set of variables that contain output information. More...
 
struct  StatisticVars
 

Public Member Functions

success_code advance (bool backward=false) override
 Advance the solution by one step, producing dense output.
 
const real & f (int i) const override
 Return the solution of the $i^{th}$ component.
 
long step_nr () const override
 Return the current integration step number, which is increased with each call to advance().
 
const real & x0 () const override
 Return the last integration parameter.
 
const real & x1 () const override
 Return the current integration parameter.
 
- Public Member Functions inherited from Traum::Integrator< DiffEquation::real >
bool contains (const real &x) const
 Query whether the current integration interval [x0,x1) contains a given value.
 

Detailed Description

template<class DiffEquation>
class Traum::Rk4< DiffEquation >

A solver implementing the so called explicit RK4 method, using constant stepsize: y_{n+1} = y_n + h/6( k1 + 2k2 + 2k3 + k4)

with

y' = f(t,y)

k1 = f(t_n,y_n) k2 = f(t_n + h/2, y_n + h/2 k1) k3 = f(t_n + h/2, y_n + h/2 k2) k4 = f(t_n + h, y_n + h k3)

Author
: marcel
Todo:
: more testing more comments about structure

Class Documentation

◆ Traum::Rk4::EvolutionVars

struct Traum::Rk4::EvolutionVars
template<class DiffEquation>
struct Traum::Rk4< DiffEquation >::EvolutionVars

Set of variables that are updated at each integration step but keep their values from the previous step.

◆ Traum::Rk4::OutputVars

struct Traum::Rk4::OutputVars
template<class DiffEquation>
struct Traum::Rk4< DiffEquation >::OutputVars

Set of variables that contain output information.

◆ Traum::Rk4::StatisticVars

struct Traum::Rk4::StatisticVars
template<class DiffEquation>
struct Traum::Rk4< DiffEquation >::StatisticVars