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

Class for integrating a system of first order ODEs. More...

#include <basic_rk_integrator.hpp>

Collaboration diagram for flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >:
Collaboration graph

Public Member Functions

int get_max_steps () const
 Returns the maximum number of allowed steps in the integration. More...
 
void operator() (double start, double end, StateType &ystart, Derivs derivs, double tolerance) const
 Integrates the system over an interval. More...
 
void set_max_steps (int s)
 Sets the maximum number of allowed steps in the integration. More...
 

Private Attributes

int max_steps {400}
 Maximum number of steps in integration. More...
 
Stepper stepper {}
 Stepper to provide a Runge-Kutta step. More...
 

Detailed Description

template<typename StateType, typename Derivs = std::function<StateType(double, const StateType&)>, typename Stepper = Basic_rk_stepper<StateType,Derivs>>
class flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >

Class for integrating a system of first order ODEs.

Template Parameters
StateTypetype of parameters vector
Derivstype of object returning the values of the derivatives
Steppertype of object implementing Runge-Kutta step

Definition at line 113 of file basic_rk_integrator.hpp.

Member Function Documentation

◆ get_max_steps()

template<typename StateType , typename Derivs = std::function<StateType(double, const StateType&)>, typename Stepper = Basic_rk_stepper<StateType,Derivs>>
int flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::get_max_steps ( ) const
inline

Returns the maximum number of allowed steps in the integration.

Returns
maximum number of steps to allow

Definition at line 125 of file basic_rk_integrator.hpp.

References flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::max_steps.

◆ operator()()

template<typename StateType , typename Derivs , typename Stepper >
void flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::operator() ( double  start,
double  end,
StateType &  ystart,
Derivs  derivs,
double  tolerance 
) const

Integrates the system over an interval.

The vector of the initial values of the parameters is updated so that after calling this function, this vector contains the updated values of the parameters at the end-point of the integration.

Parameters
[in]startinitial value of the independent variable
[in]endfinal value of the independent variable
[in,out]ystartinitial values of the parameters
[in]derivsfunction calculating the derivatives
[in]tolerancedesired accuracy to use in integration step

Definition at line 145 of file basic_rk_integrator.hpp.

References flexiblesusy::end(), and flexiblesusy::runge_kutta::integrateOdes().

◆ set_max_steps()

template<typename StateType , typename Derivs = std::function<StateType(double, const StateType&)>, typename Stepper = Basic_rk_stepper<StateType,Derivs>>
void flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::set_max_steps ( int  s)
inline

Sets the maximum number of allowed steps in the integration.

Parameters
smaximum number of steps to allow

Definition at line 121 of file basic_rk_integrator.hpp.

References flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::max_steps.

Member Data Documentation

◆ max_steps

template<typename StateType , typename Derivs = std::function<StateType(double, const StateType&)>, typename Stepper = Basic_rk_stepper<StateType,Derivs>>
int flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::max_steps {400}
private

◆ stepper

template<typename StateType , typename Derivs = std::function<StateType(double, const StateType&)>, typename Stepper = Basic_rk_stepper<StateType,Derivs>>
Stepper flexiblesusy::runge_kutta::Basic_rk_integrator< StateType, Derivs, Stepper >::stepper {}
private

Stepper to provide a Runge-Kutta step.

Definition at line 129 of file basic_rk_integrator.hpp.


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