flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs > Class Template Reference

Class to carry out a 5th order Runge-Kutta step. More...

#include <basic_rk_integrator.hpp>

Inheritance diagram for flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs >:
Inheritance graph
Collaboration diagram for flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs >:
Collaboration graph

Public Member Functions

double step (StateType &, const StateType &, double &, double, double, const StateType &, Derivs, int &) const
 Carries out a variable step-size Runge-Kutta step. More...
 

Private Member Functions

void runge_kutta_step (const StateType &, const StateType &, double, double, StateType &, StateType &, Derivs) const
 Carries out a single 5th order Runge-Kutta step. More...
 

Detailed Description

template<typename StateType, typename Derivs>
class flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs >

Class to carry out a 5th order Runge-Kutta step.

Template Parameters
StateTypetype of parameters vector
Derivstype of object returning the values of the derivatives

Definition at line 43 of file basic_rk_integrator.hpp.

Member Function Documentation

◆ runge_kutta_step()

template<typename StateType , typename Derivs >
void flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs >::runge_kutta_step ( const StateType &  y,
const StateType &  dydx,
double  x,
double  h,
StateType &  yout,
StateType &  yerr,
Derivs  derivs 
) const
private

Carries out a single 5th order Runge-Kutta step.

The step is calculated using the given fixed step-size. In addition to returning the estimate for the parameters at the next step, an estimate for the error is also returned.

Parameters
[in]ycurrent values of the parameters
[in]dydxcurrent values of the parameter derivatives
[in]xcurrent value of the independent variable
[in]hstep-size to use
[out]youtupdated values of the parameters
[out]yerrestimated truncation error
[in]derivsfunction calculating the derivatives

Definition at line 68 of file basic_rk_integrator.hpp.

References flexiblesusy::runge_kutta::rungeKuttaStep().

◆ step()

template<typename StateType , typename Derivs >
double flexiblesusy::runge_kutta::Basic_rk_stepper< StateType, Derivs >::step ( StateType &  y,
const StateType &  dydx,
double &  x,
double  htry,
double  eps,
const StateType &  yscal,
Derivs  derivs,
int &  max_step_dir 
) const

Carries out a variable step-size Runge-Kutta step.

The initial values of the independent and dependent variables are updated to their new values after calling this function, i.e., the vector y contains the approximate values of the dependent variables after carrying out the step, and x contains the new value of the independent variable.

Parameters
[in,out]ycurrent values of the parameters
[in]dydxcurrent values of the parameter derivatives
[in,out]xcurrent value of the independent variable
[in]htryinitial step-size to try
[in]epsdesired error tolerance
[in]yscalvector of scale values for fraction errors
[in]derivsfunction calculating the derivatives
[out]max_step_dirparameter with largest estimated error
Returns
estimated next step-size to use

Definition at line 93 of file basic_rk_integrator.hpp.

References flexiblesusy::runge_kutta::odeStepper().


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