|
Go to the documentation of this file.
32#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
33#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
34#include <boost/numeric/odeint/external/eigen/eigen_algebra_dispatcher.hpp>
35#include <boost/numeric/odeint/external/eigen/eigen_resize.hpp>
36#include <boost/numeric/odeint/integrate/integrate_adaptive.hpp>
37#include <boost/numeric/odeint/stepper/generation.hpp>
38#include <boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp>
44template < typename Scalar, int R, int C, int O, int MR, int MC>
45struct vector_space_norm_inf<Eigen::Array<Scalar,R,C,O,MR,MC> > {
46 using result_type = typename Eigen::NumTraits<Scalar>::Real;
47 result_type operator()( const Eigen::Array<Scalar,R,C,O,MR,MC>& x) const
49 return x.cwiseAbs().maxCoeff();
59namespace runge_kutta {
74 Eigen::ArrayXd& pars, const Derivs& derivs,
77 using state_type = Eigen::ArrayXd;
78 using stepper_type = boost::numeric::odeint::runge_kutta_fehlberg78<
79 state_type, double, state_type, double,
80 boost::numeric::odeint::vector_space_algebra
83 const double guess = ( end - start) * 0.1;
84 const auto derivatives = [derivs] ( const state_type& y, state_type& dydt, double t) -> void {
88 const auto stepper = boost::numeric::odeint::make_controlled(tol, tol, stepper_type());
89 boost::numeric::odeint::integrate_adaptive(
90 stepper, derivatives, pars, start, end, guess, RKF_observer());
97 for ( int i = 0; i < state.size(); ++i) {
104 ERROR( "RKF_integrator: non-perturbative running at Q = "
105 << std::exp(t) << " GeV of parameter y(" << max_step_dir
106 << ") = " << state(max_step_dir));
108 throw NonPerturbativeRunningError(std::exp(t), max_step_dir, state(max_step_dir));
120namespace runge_kutta {
std::function< Eigen::ArrayXd(double, const Eigen::ArrayXd &)> Derivs
void operator()(double start, double end, Eigen::ArrayXd &pars, const Derivs &derivs, double tol) const Integrates the system over an interval.
double * end(GSL_vector &v) iterator to end of GSL_vector
bool IsFinite(double x) noexcept
Integration of ODEs using the Runge-Kutta-Fehlberg method.
void operator()(const Eigen::ArrayXd &, double) const
|