flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
betafunction.cpp
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#include "betafunction.hpp"
26#include "error.hpp"
27
28#include <cmath>
29
30namespace flexiblesusy {
31
32namespace {
33
35
36} // anonymous namespace
37
39{
40 num_pars = 0;
41 loops = 0;
42 thresholds = 0;
43 scale = 0.0;
44 tolerance = 1.e-4;
45 min_tolerance = 1.0e-11;
46 zero_threshold = 1.e-11;
47}
48
56void Beta_function::run_to(double x2, double eps)
57{
58 const double tol = get_tolerance(eps);
59 run(scale, x2, tol);
60}
61
70void Beta_function::run(double x1, double x2, double eps)
71{
72 if (get_loops() > 0) {
73 const double tol = get_tolerance(eps);
74
75 if (std::fabs(x1) < tol)
77 if (std::fabs(x2) < tol)
79
80 if (fabs(x1 - x2) >= min_tolerance) {
81 Eigen::ArrayXd y(get());
82 const double start = std::log(fabs(x1));
83 const double end = std::log(fabs(x2));
84
85 integrator(start, end, y,
86 [this](double x, const Eigen::ArrayXd& y) { return derivatives(x, y); },
87 tol);
88
89 set_scale(x2);
90 set(y);
91 }
92 }
93
94 set_scale(x2);
95}
96
108Eigen::ArrayXd Beta_function::derivatives(double x, const Eigen::ArrayXd& y)
109{
110 set_scale(exp(x));
111 set(y);
112 return beta();
113}
114
127double Beta_function::get_tolerance(double eps) const
128{
129 double tol = 0;
130 if (eps < 0.0)
131 tol = tolerance;
132 else if (eps < min_tolerance)
133 tol = min_tolerance;
134 else
135 tol = eps;
136
137 return tol;
138}
139
140} // namespace flexiblesusy
Integration of ODEs by Runge-Kutta.
contains class Beta_function
int num_pars
number of parameters
int loops
to what loop order does the RG evolution run
double get_tolerance(double eps) const
virtual void run(double, double, double eps=-1.0)
virtual void run_to(double, double eps=-1.0)
double zero_threshold
threshold for treating values as zero
Eigen::ArrayXd derivatives(double, const Eigen::ArrayXd &)
double min_tolerance
minimum tolerance allowed
double scale
current renormalization scale
int thresholds
threshold correction loop order
virtual Eigen::ArrayXd beta() const =0
virtual void set(const Eigen::ArrayXd &)=0
virtual Eigen::ArrayXd get() const =0
double tolerance
running tolerance
Non-perturbative RG running.
Definition: error.hpp:142
Class for integrating a system of first order ODEs.
double * end(GSL_vector &v)
iterator to end of GSL_vector
Definition: gsl_vector.cpp:254
Complex< T > log(const Complex< T > &z) noexcept
Definition: complex.hpp:54