flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
bvp_solver_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 BVP_SOLVER_PROBLEMS_FORMAT_MATHLINK_H
20#define BVP_SOLVER_PROBLEMS_FORMAT_MATHLINK_H
21
22#include "mathlink_utils.hpp"
24
25namespace flexiblesusy {
26
28inline void mathlink_format_problems(MLINK link, const BVP_solver_problems& sp)
29{
30 MLPutFunction(link, "List", sp.number_of_problems());
31
32 if (sp.no_convergence()) {
33 MLPutRuleTo(link, "True", "NoConvergence");
34 }
35}
36
38inline void mathlink_format_warnings(MLINK link, const BVP_solver_problems& sp)
39{
40 MLPutFunction(link, "List", 0);
41}
42
43} // namespace flexiblesusy
44
45#endif
unsigned number_of_problems() const
returns number of problems
void mathlink_format_problems(MLINK link, const BVP_solver_problems &sp)
format BVP solver problems to MathLink output
void mathlink_format_warnings(MLINK link, const BVP_solver_problems &sp)
format BVP solver warnings to MathLink output