flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
rkf_integrator.hpp
Go to the documentation of this file.
1// ====================================================================
2// This file is part of FlexibleSUSY.
3//
4// FlexibleSUSY is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published
6// by the Free Software Foundation, either version 3 of the License,
7// or (at your option) any later version.
8//
9// FlexibleSUSY is distributed in the hope that it will be useful, but
10// WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with FlexibleSUSY. If not, see
16// <http://www.gnu.org/licenses/>.
17// ====================================================================
18
24#ifndef RKF_INTEGRATOR_H
25#define RKF_INTEGRATOR_H
26
27#include "error.hpp"
28#include <string>
29
30#include <Eigen/Core>
31
32namespace flexiblesusy {
33
34namespace runge_kutta {
35
44public:
45 using Derivs = std::function<Eigen::ArrayXd(double, const Eigen::ArrayXd&)>;
46
48 void operator()(double start, double end, Eigen::ArrayXd& pars,
49 const Derivs& derivs, double tol) const;
50private:
52 public:
53 explicit DisabledOdeintError(const std::string& msg) : Error(msg) {}
54 virtual ~DisabledOdeintError() = default;
55 };
56
57 struct RKF_observer {
58 void operator()(const Eigen::ArrayXd&, double) const;
59 };
60};
61
62} // namespace runge_kutta
63
64} // namespace flexiblesusy
65
66#endif
Class for integrating ODEs using a Runge-Kutta-Fehlberg method.
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
Definition: gsl_vector.cpp:254
void operator()(const Eigen::ArrayXd &, double) const