35 std::function<U(
double const&, U
const&,
double const&)>
36 rk4(std::function<U(
double const& t, U
const& Obj)>
const& f)
40 [ f ] (
double const& t, U
const& y,
double const& dt) -> U{
return
41 [t,y,dt,f ] ( U
const& dy1 ) -> U{
return
42 [t,y,dt,f,dy1 ] ( U
const& dy2 ) -> U{
return
43 [t,y,dt,f,dy1,dy2 ] ( U
const& dy3 ) -> U{
return
44 [ f,dy1,dy2,dy3] ( U
const& dy4 ) -> U{
return
45 ( dy1 + 2 * dy2 + 2 * dy3 + dy4 ) / 6 ;} (
46 dt * f( t + dt , y + dy3 ) );} (
47 dt * f( t + dt / 2, y + dy2 / 2 ) );} (
48 dt * f( t + dt / 2, y + dy1 / 2 ) );} (
60 std::function<U(
double const&, U
const&,
double const&)>
61 rk1(std::function<U(
double const& t, U
const& Obj)>
const& f)
63 return [f] (
double const& t, U
const& y,
double const& dt) -> U{
return dt * f(t, y); } ;
Namespace for all APFEL++ functions and classes.
Definition alphaqcd.h:14
std::function< U(double const &, U const &, double const &)> rk4(std::function< U(double const &t, U const &Obj)> const &f)
Template function that implements the fourth order RK algorithm.
Definition ode.h:36
std::function< U(double const &, U const &, double const &)> rk1(std::function< U(double const &t, U const &Obj)> const &f)
Template function that implements the first order RK algorithm.
Definition ode.h:61