flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
problems.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
19#ifndef PROBLEMS_H
20#define PROBLEMS_H
21
22#include <iosfwd>
23#include <map>
24#include <string>
25#include <vector>
26
27namespace flexiblesusy {
28
29class Names;
30
35class Problems {
36public:
37 Problems(const std::string& model_name_, const Names* particle_names_, const Names* parameter_names_);
38
39 void flag_bad_mass(int particle, bool flag = true);
40 void flag_running_tachyon(int particle, bool flag = true);
41 void flag_pole_tachyon(int particle, bool flag = true);
42 void flag_thrown(const std::string& msg = "unknown");
43 void flag_no_ewsb();
47 void flag_no_pole_mass_convergence(int particle);
48 void flag_non_perturbative_parameter(int parameter, double value, double scale, double threshold = 0.);
51 void flag_no_minimum(const std::string& msg, int status);
52 void flag_no_root(const std::string& msg, int status);
53
54 void unflag_bad_mass(int particle);
56 void unflag_running_tachyon(int particle);
57 void unflag_pole_tachyon(int particle);
59 void unflag_thrown();
60 void unflag_no_ewsb();
64 void unflag_no_pole_mass_convergence(int particle);
65 void unflag_non_perturbative_parameter(int parameter);
69 void unflag_no_minimum(const std::string& msg);
70 void unflag_no_root(const std::string& msg);
71
72 bool is_bad_mass(int particle) const;
73 bool is_running_tachyon(int particle) const;
74 bool is_pole_tachyon(int particle) const;
75 bool have_bad_mass() const;
76 bool have_running_tachyon() const;
77 bool have_pole_tachyon() const;
78 bool have_tachyon() const;
79 bool have_thrown() const;
82 bool no_ewsb() const;
83 bool no_ewsb_tree_level() const;
84 bool no_GFermi_convergence() const;
85 bool no_perturbative() const;
86 bool no_sinThetaW_convergence() const;
87 bool no_G_fermi_convergence() const;
88 bool no_minimum() const;
89 bool no_root() const;
90
91 void add(const Problems&);
92 void clear();
93 bool have_problem() const;
94 bool have_warning() const;
95 unsigned number_of_problems() const;
96 unsigned number_of_warnings() const;
97 std::vector<std::string> get_problem_strings() const;
98 std::vector<std::string> get_warning_strings() const;
99 std::string get_problem_string(const std::string& sep = "\n") const;
100 std::string get_warning_string(const std::string& sep = "\n") const;
101 std::string get_particle_name(int) const;
102 std::string get_parameter_name(int) const;
103 void print_problems() const;
104 void print_problems(std::ostream&) const;
105 void print_warnings() const;
106 void print_warnings(std::ostream&) const;
107 const std::string& get_model_name() const;
108
109 std::vector<int> get_bad_masses() const;
110 std::vector<int> get_running_tachyons() const;
111 std::vector<int> get_pole_tachyons() const;
112 std::vector<int> get_failed_pole_mass_convergence() const;
113
114private:
117 NonPerturbativeValue(double value_, double scale_, double threshold_)
118 : value(value_), scale(scale_), threshold(threshold_) {}
119 double value{0.}, scale{0.}, threshold{0.};
120 };
121
122 std::string model_name;
125 std::vector<int> bad_masses;
126 std::vector<int> running_tachyons;
127 std::vector<int> pole_tachyons;
129 std::map<int, NonPerturbativeValue> non_pert_pars;
130 std::map<std::string, int> failed_minimum;
131 std::map<std::string, int> failed_root;
132 std::string exception_msg;
133 bool failed_ewsb{false};
136 bool non_perturbative{false};
139};
140
141std::ostream& operator<<(std::ostream&, const Problems&);
142
143} // namespace flexiblesusy
144
145#endif
Generic interface to access names of parameters and particles.
Definition names.hpp:30
stores problem flags for the spectrum generator
Definition problems.hpp:35
bool have_problem() const
problems which yield invalid spectrum
Definition problems.cpp:107
std::vector< std::string > get_warning_strings() const
Definition problems.cpp:215
void flag_no_pole_mass_convergence(int particle)
Definition problems.cpp:317
void flag_no_sinThetaW_convergence()
Definition problems.cpp:338
std::string model_name
model name
Definition problems.hpp:122
bool is_pole_tachyon(int particle) const
Definition problems.cpp:454
bool have_thrown() const
Definition problems.cpp:482
const std::string & get_model_name() const
Definition problems.cpp:264
bool no_perturbative() const
Definition problems.cpp:514
bool no_sinThetaW_convergence() const
Definition problems.cpp:519
bool failed_ewsb_tree_level
no tree-level EWSB
Definition problems.hpp:134
bool have_tachyon() const
Definition problems.cpp:477
void flag_thrown(const std::string &msg="unknown")
Definition problems.cpp:292
void unflag_all_non_perturbative_parameters()
Definition problems.cpp:419
bool have_failed_pole_mass_convergence() const
Definition problems.cpp:492
std::vector< std::string > get_problem_strings() const
Definition problems.cpp:154
void unflag_pole_tachyon(int particle)
Definition problems.cpp:373
void unflag_no_root(const std::string &msg)
Definition problems.cpp:439
std::string get_particle_name(int) const
returns particle name
Definition problems.cpp:149
bool is_bad_mass(int particle) const
Definition problems.cpp:444
void unflag_bad_mass(int particle)
Definition problems.cpp:358
std::vector< int > get_bad_masses() const
Definition problems.cpp:539
bool have_bad_mass() const
Definition problems.cpp:459
bool is_running_tachyon(int particle) const
Definition problems.cpp:449
std::map< std::string, int > failed_minimum
no minimum found (message, status code)
Definition problems.hpp:130
void flag_running_tachyon(int particle, bool flag=true)
Definition problems.cpp:274
bool no_minimum() const
Definition problems.cpp:529
std::map< int, NonPerturbativeValue > non_pert_pars
non-perturbative parmeters
Definition problems.hpp:129
bool have_pole_tachyon() const
Definition problems.cpp:471
void flag_non_perturbative_parameter(int parameter, double value, double scale, double threshold=0.)
Definition problems.cpp:322
bool no_G_fermi_convergence() const
Definition problems.cpp:524
std::vector< int > failed_pole_mass_convergence
no convergence during pole mass calculation
Definition problems.hpp:128
std::vector< int > get_failed_pole_mass_convergence() const
Definition problems.cpp:554
void clear()
clear all problems
Definition problems.cpp:65
bool have_running_tachyon() const
Definition problems.cpp:465
void unflag_no_minimum(const std::string &msg)
Definition problems.cpp:434
void unflag_running_tachyon(int particle)
Definition problems.cpp:368
void unflag_no_G_fermi_convergence()
Definition problems.cpp:429
unsigned number_of_warnings() const
returns number of warnings
Definition problems.cpp:134
bool no_GFermi_convergence() const
Definition problems.cpp:509
std::string get_parameter_name(int) const
returns parameter name
Definition problems.cpp:141
void flag_no_G_fermi_convergence()
Definition problems.cpp:343
std::map< std::string, int > failed_root
no root found (message, status code)
Definition problems.hpp:131
const Names * particle_names
access to particle names
Definition problems.hpp:123
std::vector< int > running_tachyons
tachyonic particles (running mass)
Definition problems.hpp:126
void flag_no_root(const std::string &msg, int status)
Definition problems.cpp:353
std::vector< int > pole_tachyons
tachyonic particles (pole mass)
Definition problems.hpp:127
std::vector< int > get_pole_tachyons() const
Definition problems.cpp:549
bool failed_GFermi_convergence
G_Fermi not converged.
Definition problems.hpp:135
void flag_bad_mass(int particle, bool flag=true)
Definition problems.cpp:269
void unflag_no_sinThetaW_convergence()
Definition problems.cpp:424
unsigned number_of_problems() const
returns number of problems
Definition problems.cpp:112
void unflag_non_perturbative_parameter(int parameter)
Definition problems.cpp:414
std::string get_warning_string(const std::string &sep="\n") const
Definition problems.cpp:233
void unflag_no_GFermi_convergence()
Definition problems.cpp:399
bool no_ewsb_tree_level() const
Definition problems.cpp:504
void flag_pole_tachyon(int particle, bool flag=true)
Definition problems.cpp:283
void add(const Problems &)
add problems from other class
Definition problems.cpp:83
const Names * parameter_names
access to parameter names
Definition problems.hpp:124
bool have_warning() const
warnings
Definition problems.cpp:129
void unflag_no_pole_mass_convergence(int particle)
Definition problems.cpp:409
std::string exception_msg
exception message
Definition problems.hpp:132
void flag_no_GFermi_convergence()
Definition problems.cpp:307
void print_warnings() const
Definition problems.cpp:251
std::vector< int > bad_masses
imprecise mass eigenvalues
Definition problems.hpp:125
std::vector< int > get_running_tachyons() const
Definition problems.cpp:544
std::string get_problem_string(const std::string &sep="\n") const
Definition problems.cpp:228
bool failed_sinThetaW_convergence
sinThetaW-parameter not converged
Definition problems.hpp:137
void print_problems() const
Definition problems.cpp:238
bool non_perturbative
non-perturbative running
Definition problems.hpp:136
bool failed_ewsb
no EWSB
Definition problems.hpp:133
bool have_non_perturbative_parameter() const
Definition problems.cpp:487
void flag_no_minimum(const std::string &msg, int status)
Definition problems.cpp:348
bool failed_GF_convergence
GF calculation did not converge.
Definition problems.hpp:138
std::ostream & operator<<(std::ostream &ostr, const Dynamic_array_view< ElementType > &av)
NonPerturbativeValue(double value_, double scale_, double threshold_)
Definition problems.hpp:117