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.);
50 void flag_no_minimum(const std::string& msg, int status);
51 void flag_no_root(const std::string& msg, int status);
52
53 void unflag_bad_mass(int particle);
55 void unflag_running_tachyon(int particle);
56 void unflag_pole_tachyon(int particle);
58 void unflag_thrown();
59 void unflag_no_ewsb();
63 void unflag_no_pole_mass_convergence(int particle);
64 void unflag_non_perturbative_parameter(int parameter);
67 void unflag_no_minimum(const std::string& msg);
68 void unflag_no_root(const std::string& msg);
69
70 bool is_bad_mass(int particle) const;
71 bool is_running_tachyon(int particle) const;
72 bool is_pole_tachyon(int particle) const;
73 bool have_bad_mass() const;
74 bool have_running_tachyon() const;
75 bool have_pole_tachyon() const;
76 bool have_tachyon() const;
77 bool have_thrown() const;
80 bool no_ewsb() const;
81 bool no_ewsb_tree_level() const;
82 bool no_GFermi_convergence() const;
83 bool no_perturbative() const;
84 bool no_sinThetaW_convergence() const;
85 bool no_minimum() const;
86 bool no_root() const;
87
88 void add(const Problems&);
89 void clear();
90 bool have_problem() const;
91 bool have_warning() const;
92 unsigned number_of_problems() const;
93 unsigned number_of_warnings() const;
94 std::vector<std::string> get_problem_strings() const;
95 std::vector<std::string> get_warning_strings() const;
96 std::string get_problem_string(const std::string& sep = "\n") const;
97 std::string get_warning_string(const std::string& sep = "\n") const;
98 std::string get_particle_name(int) const;
99 std::string get_parameter_name(int) const;
100 void print_problems() const;
101 void print_problems(std::ostream&) const;
102 void print_warnings() const;
103 void print_warnings(std::ostream&) const;
104 const std::string& get_model_name() const;
105
106 std::vector<int> get_bad_masses() const;
107 std::vector<int> get_running_tachyons() const;
108 std::vector<int> get_pole_tachyons() const;
109 std::vector<int> get_failed_pole_mass_convergence() const;
110
111private:
114 NonPerturbativeValue(double value_, double scale_, double threshold_)
115 : value(value_), scale(scale_), threshold(threshold_) {}
116 double value{0.}, scale{0.}, threshold{0.};
117 };
118
119 std::string model_name;
122 std::vector<int> bad_masses;
123 std::vector<int> running_tachyons;
124 std::vector<int> pole_tachyons;
126 std::map<int, NonPerturbativeValue> non_pert_pars;
127 std::map<std::string, int> failed_minimum;
128 std::map<std::string, int> failed_root;
129 std::string exception_msg;
130 bool failed_ewsb{false};
133 bool non_perturbative{false};
135};
136
137std::ostream& operator<<(std::ostream&, const Problems&);
138
139} // namespace flexiblesusy
140
141#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:105
std::vector< std::string > get_warning_strings() const
Definition: problems.cpp:210
void flag_no_pole_mass_convergence(int particle)
Definition: problems.cpp:312
void flag_no_sinThetaW_convergence()
Definition: problems.cpp:333
std::string model_name
model name
Definition: problems.hpp:119
bool is_pole_tachyon(int particle) const
Definition: problems.cpp:439
bool have_thrown() const
Definition: problems.cpp:467
const std::string & get_model_name() const
Definition: problems.cpp:259
bool no_perturbative() const
Definition: problems.cpp:499
bool no_sinThetaW_convergence() const
Definition: problems.cpp:504
bool failed_ewsb_tree_level
no tree-level EWSB
Definition: problems.hpp:131
bool have_tachyon() const
Definition: problems.cpp:462
void flag_thrown(const std::string &msg="unknown")
Definition: problems.cpp:287
void unflag_all_non_perturbative_parameters()
Definition: problems.cpp:409
bool no_root() const
Definition: problems.cpp:514
bool have_failed_pole_mass_convergence() const
Definition: problems.cpp:477
std::vector< std::string > get_problem_strings() const
Definition: problems.cpp:151
void unflag_pole_tachyon(int particle)
Definition: problems.cpp:363
void unflag_no_root(const std::string &msg)
Definition: problems.cpp:424
std::string get_particle_name(int) const
returns particle name
Definition: problems.cpp:146
bool is_bad_mass(int particle) const
Definition: problems.cpp:429
void unflag_bad_mass(int particle)
Definition: problems.cpp:348
std::vector< int > get_bad_masses() const
Definition: problems.cpp:519
bool have_bad_mass() const
Definition: problems.cpp:444
bool is_running_tachyon(int particle) const
Definition: problems.cpp:434
std::map< std::string, int > failed_minimum
no minimum found (message, status code)
Definition: problems.hpp:127
void flag_running_tachyon(int particle, bool flag=true)
Definition: problems.cpp:269
bool no_minimum() const
Definition: problems.cpp:509
std::map< int, NonPerturbativeValue > non_pert_pars
non-perturbative parmeters
Definition: problems.hpp:126
bool have_pole_tachyon() const
Definition: problems.cpp:456
Problems(const std::string &model_name_, const Names *particle_names_, const Names *parameter_names_)
Definition: problems.cpp:53
void flag_non_perturbative_parameter(int parameter, double value, double scale, double threshold=0.)
Definition: problems.cpp:317
std::vector< int > failed_pole_mass_convergence
no convergence during pole mass calculation
Definition: problems.hpp:125
void unflag_no_ewsb_tree_level()
Definition: problems.cpp:384
std::vector< int > get_failed_pole_mass_convergence() const
Definition: problems.cpp:534
void clear()
clear all problems
Definition: problems.cpp:65
bool have_running_tachyon() const
Definition: problems.cpp:450
void unflag_no_minimum(const std::string &msg)
Definition: problems.cpp:419
bool no_ewsb() const
Definition: problems.cpp:484
void unflag_running_tachyon(int particle)
Definition: problems.cpp:358
unsigned number_of_warnings() const
returns number of warnings
Definition: problems.cpp:131
bool no_GFermi_convergence() const
Definition: problems.cpp:494
std::string get_parameter_name(int) const
returns parameter name
Definition: problems.cpp:138
std::map< std::string, int > failed_root
no root found (message, status code)
Definition: problems.hpp:128
const Names * particle_names
access to particle names
Definition: problems.hpp:120
std::vector< int > running_tachyons
tachyonic particles (running mass)
Definition: problems.hpp:123
void flag_no_root(const std::string &msg, int status)
Definition: problems.cpp:343
std::vector< int > pole_tachyons
tachyonic particles (pole mass)
Definition: problems.hpp:124
std::vector< int > get_pole_tachyons() const
Definition: problems.cpp:529
bool failed_GFermi_convergence
G_Fermi not converged.
Definition: problems.hpp:132
void flag_bad_mass(int particle, bool flag=true)
Definition: problems.cpp:264
void unflag_no_sinThetaW_convergence()
Definition: problems.cpp:414
unsigned number_of_problems() const
returns number of problems
Definition: problems.cpp:110
void unflag_non_perturbative_parameter(int parameter)
Definition: problems.cpp:404
std::string get_warning_string(const std::string &sep="\n") const
Definition: problems.cpp:228
void unflag_no_GFermi_convergence()
Definition: problems.cpp:389
bool no_ewsb_tree_level() const
Definition: problems.cpp:489
void flag_pole_tachyon(int particle, bool flag=true)
Definition: problems.cpp:278
void add(const Problems &)
add problems from other class
Definition: problems.cpp:82
const Names * parameter_names
access to parameter names
Definition: problems.hpp:121
bool have_warning() const
warnings
Definition: problems.cpp:126
void unflag_no_pole_mass_convergence(int particle)
Definition: problems.cpp:399
std::string exception_msg
exception message
Definition: problems.hpp:129
void flag_no_GFermi_convergence()
Definition: problems.cpp:302
void print_warnings() const
Definition: problems.cpp:246
std::vector< int > bad_masses
imprecise mass eigenvalues
Definition: problems.hpp:122
void flag_no_ewsb_tree_level()
Definition: problems.cpp:297
std::vector< int > get_running_tachyons() const
Definition: problems.cpp:524
std::string get_problem_string(const std::string &sep="\n") const
Definition: problems.cpp:223
bool failed_sinThetaW_convergence
sinThetaW-parameter not converged
Definition: problems.hpp:134
void print_problems() const
Definition: problems.cpp:233
bool non_perturbative
non-perturbative running
Definition: problems.hpp:133
bool failed_ewsb
no EWSB
Definition: problems.hpp:130
bool have_non_perturbative_parameter() const
Definition: problems.cpp:472
void flag_no_minimum(const std::string &msg, int status)
Definition: problems.cpp:338
std::ostream & operator<<(std::ostream &ostr, const Dynamic_array_view< ElementType > &av)
Definition: array_view.hpp:143
NonPerturbativeValue(double value_, double scale_, double threshold_)
Definition: problems.hpp:114