GM2Calc 2.3.0
Loading...
Searching...
No Matches
MSSMNoFV_onshell_problems.cpp
Go to the documentation of this file.
1// ====================================================================
2// This file is part of GM2Calc.
3//
4// GM2Calc 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// GM2Calc 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 GM2Calc. If not, see
16// <http://www.gnu.org/licenses/>.
17// ====================================================================
18
20
21#include <algorithm>
22#include <iostream>
23#include <sstream>
24
25namespace gm2calc {
26
28{
29 tachyons.clear();
30}
31
33{
34 have_no_convergence_Mu_MassB_MassWB = false;
35 have_no_convergence_me2 = false;
36 convergence_problem_Mu_MassB_MassWB.clear();
37 convergence_problem_me2.clear();
38}
39
45
47{
48 tachyons.push_back(particle_name);
49 std::sort(tachyons.begin(), tachyons.end());
50 tachyons.erase(std::unique(tachyons.begin(), tachyons.end()), tachyons.end());
51}
52
54 double precision, unsigned iterations)
55{
56 have_no_convergence_Mu_MassB_MassWB = true;
57 convergence_problem_Mu_MassB_MassWB.precision = precision;
58 convergence_problem_Mu_MassB_MassWB.iterations = iterations;
59}
60
62{
63 have_no_convergence_Mu_MassB_MassWB = false;
64 convergence_problem_Mu_MassB_MassWB.clear();
65}
66
68 double precision, unsigned iterations)
69{
70 have_no_convergence_me2 = true;
71 convergence_problem_me2.precision = precision;
72 convergence_problem_me2.iterations = iterations;
73}
74
76{
77 have_no_convergence_me2 = false;
78 convergence_problem_me2.clear();
79}
80
82{
83 return !tachyons.empty();
84}
85
87{
88 return have_tachyon();
89}
90
92{
93 return have_no_convergence_Mu_MassB_MassWB || have_no_convergence_me2;
94}
95
96/// returns true if DR-bar to OS conversion for Mu, M1, M2 did not converge
98{
99 return have_no_convergence_Mu_MassB_MassWB;
100}
101
102/// returns true if DR-bar to OS conversion for me2(1,1) did not converge
104{
105 return have_no_convergence_me2;
106}
107
108/// returns information about convergence problem for Mu, M1, M2 iteration
111{
112 return convergence_problem_Mu_MassB_MassWB;
113}
114
115/// returns information about convergence problem for me2(1,1) iteration
118{
119 return convergence_problem_me2;
120}
121
123{
124 std::ostringstream ostr;
126 return ostr.str();
127}
128
130{
131 std::ostringstream ostr;
133 return ostr.str();
134}
135
137{
138 if (have_problem()) {
139 ostr << "Problem: ";
140 }
141
142 if (have_tachyon()) {
143 for (auto it = tachyons.cbegin(), end = tachyons.cend(); it != end; ++it) {
144 if (it != tachyons.begin()) {
145 ostr << ", ";
146 }
147 ostr << *it << " tachyon";
148 }
149 }
150}
151
153{
154 if (have_warning()) {
155 ostr << "Warning:";
156 }
157
158 if (have_no_convergence_Mu_MassB_MassWB) {
159 ostr << " DR-bar to on-shell conversion for Mu, M1, M2 failed"
160 " (reached absolute accuracy: "
161 << convergence_problem_Mu_MassB_MassWB.precision << " GeV),";
162 }
163
164 if (have_no_convergence_me2) {
165 ostr << " DR-bar to on-shell conversion for me2 failed"
166 " (reached absolute accuracy: "
167 << convergence_problem_me2.precision << " GeV)";
168 }
169}
170
171void MSSMNoFV_onshell_problems::print(std::ostream& ostr) const
172{
175}
176
177std::ostream& operator<<(std::ostream& ostr, const MSSMNoFV_onshell_problems& problems)
178{
179 problems.print(ostr);
180 return ostr;
181}
182
183} // namespace gm2calc
contains problem and warning flags
void print_warnings(std::ostream &) const
print warnings to stream
Convergence_problem get_me2_convergence_problem() const
returns information about convergence problem for me2(1,1) iteration
bool have_tachyon() const
returns true if tachyon exists
bool have_problem() const
returns true if problem has occurred
std::string get_warnings() const
get warnings as string
Convergence_problem get_Mu_MassB_MassWB_convergence_problem() const
returns information about convergence problem for Mu, M1, M2 iteration
void clear()
delete all problems and warnings
bool no_me2_convergence() const
returns true if DR-bar to OS conversion for me2(1,1) did not converge
bool no_Mu_MassB_MassWB_convergence() const
returns true if DR-bar to OS conversion for Mu, M1, M2 did not converge
void print_problems(std::ostream &) const
print problems to stream
void print(std::ostream &) const
print problems and warnings to stream
void flag_no_convergence_Mu_MassB_MassWB(double, unsigned)
bool have_warning() const
returns true if there is a warning
std::string get_problems() const
get problems as string
void svd_eigen(const Eigen::Matrix< Scalar, M, N > &m, Eigen::Array< Real,(((M)<(N)) ?(M) :(N)), 1 > &s, Eigen::Matrix< Scalar, M, M > *u, Eigen::Matrix< Scalar, N, N > *vh)
std::ostream & operator<<(std::ostream &os, const MSSMNoFV_onshell &model)
streaming operator