flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
two_scale_running_precision.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
20#include "logger.hpp"
21
22#include <algorithm>
23#include <cmath>
24#include <limits>
25
26namespace flexiblesusy {
27
30 , precision(precision_)
31{
32}
33
35= default;
36
38{
39 return precision;
40}
41
42Two_scale_increasing_precision::Two_scale_increasing_precision(double decreasing_factor_, double minimum_precision_)
44 , decreasing_factor(decreasing_factor_)
45 , minimum_precision(minimum_precision_)
46{
47 if (decreasing_factor < std::numeric_limits<double>::min())
48 FATAL("<Two_scale_increasing_precision>: decreasing factor "
49 << decreasing_factor << " is too small");
50}
51
53= default;
54
56{
57 return std::max(exp(- static_cast<double>(iteration + 1) * log(decreasing_factor)),
59}
60
61} // namespace flexiblesusy
#define FATAL(msg)
Definition: logger.hpp:67
Complex< T > log(const Complex< T > &z) noexcept
Definition: complex.hpp:54