flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
observable_problems_format_mathlink.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 OBSERVABLE_PROBLEMS_FORMAT_MATHLINK_H
20#define OBSERVABLE_PROBLEMS_FORMAT_MATHLINK_H
21
22#include "mathlink_utils.hpp"
23#include "observables.hpp"
25
26namespace flexiblesusy {
27
28namespace observable_problems {
29
30
32inline void mathlink_format_problems(MLINK link, const Problem_general& problems)
33{
34 MLPutRule(link, "general");
35 MLPutFunction(link, "List", problems.number_of_problems());
36
37 if (problems.have_non_perturbative_running())
38 MLPutRuleTo(link, "True", "NonPerturbative");
39 if (problems.have_thrown())
40 MLPutRuleTo(link, "True", "Exceptions");
41}
42
43
45inline void mathlink_format_problems(MLINK link, const Problem_a_muon& problems)
46{
48 MLPutFunction(link, "List", problems.number_of_problems());
49
50 if (problems.have_non_perturbative_running())
51 MLPutRuleTo(link, "True", "NonPerturbative");
52}
53
54
55} // namespace observable_problems
56
57
59inline void mathlink_format_problems(MLINK link, const Observable_problems& op)
60{
61 if (op.have_problem()) {
62 MLPutFunction(link, "List", 2);
65 } else {
66 MLPutFunction(link, "List", 0);
67 }
68}
69
70
71} // namespace flexiblesusy
72
73#endif
observable_problems::Problem_general general
general problems
observable_problems::Problem_a_muon a_muon
problems for a_muon
bool have_problem() const
returns true if there is a problem, false otherwise
unsigned number_of_problems() const
returns number of problems
unsigned number_of_problems() const
returns number of problems
void mathlink_format_problems(MLINK link, const Problem_general &problems)
format general observable problems to MathLink output
const char *const observable_names[NUMBER_OF_OBSERVABLES]
observable names
Definition: observables.cpp:25
void mathlink_format_problems(MLINK link, const BVP_solver_problems &sp)
format BVP solver problems to MathLink output