forked from Expander/FlexibleSUSY
-
Notifications
You must be signed in to change notification settings - Fork 14
/
two_scale_high_scale_constraint.cpp.in
164 lines (133 loc) · 4.5 KB
/
two_scale_high_scale_constraint.cpp.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// ====================================================================
// This file is part of FlexibleSUSY.
//
// FlexibleSUSY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// FlexibleSUSY is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with FlexibleSUSY. If not, see
// <http://www.gnu.org/licenses/>.
// ====================================================================
// File generated at @DateAndTime@
#include "@ModelName@_two_scale_high_scale_constraint.hpp"
#include "@ModelName@_two_scale_model.hpp"
#include "@ModelName@_info.hpp"
#include "wrappers.hpp"
#include "logger.hpp"
#include "ew_input.hpp"
#include "gsl_utils.hpp"
#include "minimizer.hpp"
#include "root_finder.hpp"
#include "threshold_loop_functions.hpp"
#include "numerics2.hpp"
#include <cassert>
#include <cmath>
#include <cerrno>
#include <cstring>
namespace flexiblesusy {
#define DERIVEDPARAMETER(p) model->p()
#define INPUTPARAMETER(p) model->get_input().p
#define MODELPARAMETER(p) model->get_##p()
#define PHASE(p) model->get_##p()
#define BETAPARAMETER(p) beta_functions.get_##p()
#define BETAPARAMETER1(l,p) beta_functions_##l##L.get_##p()
#define BETA(p) beta_##p
#define BETA1(l,p) beta_##l##L_##p
#define LowEnergyConstant(p) Electroweak_constants::p
#define MZPole Electroweak_constants::MZ
#define STANDARDDEVIATION(p) Electroweak_constants::Error_##p
#define Pole(p) model->get_physical().p
#define SCALE model->get_scale()
#define THRESHOLD static_cast<int>(model->get_thresholds())
#define MODEL model
#define MODELCLASSNAME @ModelName@<Two_scale>
@ModelName@_high_scale_constraint<Two_scale>::@ModelName@_high_scale_constraint(
@ModelName@<Two_scale>* model_)
: model(model_)
{
initialize();
}
@ModelName@_high_scale_constraint<Two_scale>::~@ModelName@_high_scale_constraint()
{
}
void @ModelName@_high_scale_constraint<Two_scale>::apply()
{
assert(model && "Error: @ModelName@_high_scale_constraint::apply():"
" model pointer must not be zero");
@temporarySetting@
update_scale();
@applyConstraint@
check_non_perturbative();
@temporaryResetting@
}
bool @ModelName@_high_scale_constraint<Two_scale>::check_non_perturbative()
{
bool problem = false;
@checkPerturbativityForDimensionlessParameters@
return problem;
}
double @ModelName@_high_scale_constraint<Two_scale>::get_scale() const
{
return scale;
}
double @ModelName@_high_scale_constraint<Two_scale>::get_initial_scale_guess() const
{
return initial_scale_guess;
}
const @ModelName@_input_parameters& @ModelName@_high_scale_constraint<Two_scale>::get_input_parameters() const
{
return model->get_input();
}
@ModelName@<Two_scale>* @ModelName@_high_scale_constraint<Two_scale>::get_model() const
{
return model;
}
void @ModelName@_high_scale_constraint<Two_scale>::set_model(Model* model_)
{
model = cast_model<@ModelName@<Two_scale>*>(model_);
}
void @ModelName@_high_scale_constraint<Two_scale>::set_scale(double s)
{
scale = s;
}
void @ModelName@_high_scale_constraint<Two_scale>::clear()
{
scale = 0.;
initial_scale_guess = 0.;
model = NULL;
}
void @ModelName@_high_scale_constraint<Two_scale>::initialize()
{
assert(model && "@ModelName@_high_scale_constraint<Two_scale>::"
"initialize(): model pointer is zero.");
@scaleGuess@
scale = initial_scale_guess;
}
void @ModelName@_high_scale_constraint<Two_scale>::update_scale()
{
assert(model && "@ModelName@_high_scale_constraint<Two_scale>::"
"update_scale(): model pointer is zero.");
const double currentScale = model->get_scale();
const @ModelName@_soft_parameters beta_functions(model->calc_beta());
@calculateScale@
if (errno == ERANGE) {
#ifdef ENABLE_VERBOSE
ERROR("@ModelName@_high_scale_constraint<Two_scale>: Overflow error"
" during calculation of high scale: " << strerror(errno) << '\n'
<< " current scale = " << currentScale << '\n'
<< " new scale = " << scale << '\n'
<< " resetting scale to " << get_initial_scale_guess());
#endif
scale = get_initial_scale_guess();
errno = 0;
}
@restrictScale@
}
} // namespace flexiblesusy