flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
physical_input.cpp
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#include "physical_input.hpp"
20#include "error.hpp"
21#include <algorithm>
22
23namespace flexiblesusy {
24
32{
33 reset();
34}
35
37{
38 return values.at(o);
39}
40
41Eigen::ArrayXd Physical_input::get() const
42{
43 Eigen::ArrayXd vec(values.size());
44
45 std::copy(values.cbegin(), values.cend(), vec.data());
46
47 return vec;
48}
49
50const std::array<std::string, Physical_input::NUMBER_OF_INPUT_PARAMETERS>& Physical_input::get_names()
51{
52 static const std::array<std::string, NUMBER_OF_INPUT_PARAMETERS> names = {
53 "alpha_em(0)",
54 "mh_pole"
55 };
56 return names;
57}
58
59void Physical_input::set(Input o, double value)
60{
61 values.at(o) = value;
62}
63
64void Physical_input::set(const Eigen::ArrayXd& vec)
65{
66 if (vec.size() != static_cast<decltype(vec.size())>(values.size()))
67 throw SetupError("Parameters array has wrong size");
68
69 std::copy(vec.data(), vec.data() + vec.size(), values.begin());
70}
71
81{
82 values[alpha_em_0] = 1./137.035999074;
83 values[mh_pole] = 125.09;
84}
85
86} // namespace flexiblesusy
void reset()
resets all input parameters to their defaults
void set(Input, double)
set value of input parameter
Eigen::ArrayXd get() const
get all input parameter values
Input
available physical input parameters
@ alpha_em_0
[0] alpha_em(0), thompson limit
@ mh_pole
[1] SM Higgs pole mass
static const std::array< std::string, NUMBER_OF_INPUT_PARAMETERS > & get_names()
get names of input parameters
std::array< double, NUMBER_OF_INPUT_PARAMETERS > values
input parameter values
Spectrum generator was not setup correctly.
Definition: error.hpp:46