GM2Calc 2.3.0
Loading...
Searching...
No Matches
THDM_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
35
41
43{
44 tachyons.push_back(particle_name);
45 std::sort(tachyons.begin(), tachyons.end());
46 tachyons.erase(std::unique(tachyons.begin(), tachyons.end()), tachyons.end());
47}
48
50{
51 return !tachyons.empty();
52}
53
55{
56 return have_tachyon();
57}
58
60{
61 return false;
62}
63
64std::string THDM_problems::get_warnings() const
65{
66 std::ostringstream ostr;
68 return ostr.str();
69}
70
71std::string THDM_problems::get_problems() const
72{
73 std::ostringstream ostr;
75 return ostr.str();
76}
77
78void THDM_problems::print_problems(std::ostream& ostr) const
79{
80 if (have_problem()) {
81 ostr << "Problem: ";
82 }
83
84 if (have_tachyon()) {
85 for (auto it = tachyons.cbegin(), end = tachyons.cend(); it != end; ++it) {
86 if (it != tachyons.begin()) {
87 ostr << ", ";
88 }
89 ostr << *it << " tachyon";
90 }
91 }
92}
93
94void THDM_problems::print_warnings(std::ostream& ostr) const
95{
96 if (have_warning()) {
97 ostr << "Warning:";
98 }
99}
100
101void THDM_problems::print(std::ostream& ostr) const
102{
105}
106
107std::ostream& operator<<(std::ostream& ostr, const THDM_problems& problems)
108{
109 problems.print(ostr);
110 return ostr;
111}
112
113} // namespace gm2calc
contains problem and warning flags
void flag_tachyon(const std::string &)
void clear()
delete all problems and warnings
void print_warnings(std::ostream &) const
print warnings to stream
bool have_warning() const
returns true if there is a warning
std::string get_warnings() const
get warnings as string
std::string get_problems() const
get problems as string
void print_problems(std::ostream &) const
print problems to stream
void print(std::ostream &) const
print problems and warnings to stream
bool have_tachyon() const
returns true if tachyon exists
void clear_warnings()
delete all warnings
void clear_problems()
delete all problems
bool have_problem() const
returns true if problem has occurred
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