10 #ifndef SRC_INCLUDE_SMASH_INPUT_KEYS_H_
11 #define SRC_INCLUDE_SMASH_INPUT_KEYS_H_
46 namespace InputSections {
68 const std::string_view
name =
"";
76 explicit constexpr
Section(std::string_view name_in,
77 const Section *parent_in =
nullptr)
97 labels.emplace_back(current->name);
100 std::reverse(labels.begin(), labels.end());
114 return Section{child, &parent};
1266 static const std::set<std::string_view>
1268 static const std::set<std::string_view> valid_labels{
"t",
1302 "perturbative_weight"};
1303 return valid_labels;
1310 {
"particles"}, {
"0.30"}, detail::get_default_validator<std::string>()};
1315 {
"decaymodes"}, {
"0.30"}, detail::get_default_validator<std::string>()};
1336 [](
const double &value) noexcept {
return value > 0; }};
1364 [](
const std::string &value) noexcept {
1365 const std::set<std::string> valid_values = {
"Box",
"Collider",
"List",
1366 "ListBox",
"Sphere"};
1367 return valid_values.count(value) > 0;
1386 [](
const int &value) noexcept {
return value > 0; }};
1401 detail::get_default_validator<int64_t>()};
1416 [](
const int &value) noexcept {
return value > 0; }};
1430 [](
const int &value) noexcept {
return value > 0; }};
1464 [](
const double &value) noexcept {
return value > 0; }};
1490 detail::get_default_validator<DerivativesMode>()};
1508 [](
const double &value) noexcept {
1509 return value > 1. / 7. && value < 1.;
1543 [](
const int &value) noexcept {
return value > 0; }};
1567 detail::get_default_validator<double>()};
1599 detail::get_default_validator<FieldDerivativesMode>()};
1617 [](
const double &value) noexcept {
1618 return value >= 2.0 && value <= 10.0;
1637 [](
const double &value) noexcept {
return value > 0.1 && value < 3.0; }};
1660 detail::get_default_validator<ExpansionMode>()};
1674 {
"2.1",
"3.0",
"3.0"},
1675 detail::get_default_validator<RestFrameDensityDerivativesMode>()};
1735 detail::get_default_validator<SmearingMode>()};
1768 [](
const int &value) noexcept {
1770 logg[LogArea::Configuration::id].warn(
1771 "Number of testparticles is very large, which may lead to long"
1772 "runtime. Make sure that this is intended.");
1802 detail::get_default_validator<TimeStepMode>()};
1818 [](
const double &value) noexcept {
return value > 0; }};
1835 detail::get_default_validator<bool>()};
1854 detail::get_default_validator<einhard::LogLevel>()};
1873 detail::get_default_validator<einhard::LogLevel>()};
1889 detail::get_default_validator<einhard::LogLevel>()};
1905 detail::get_default_validator<einhard::LogLevel>()};
1921 detail::get_default_validator<einhard::LogLevel>()};
1937 detail::get_default_validator<einhard::LogLevel>()};
1953 detail::get_default_validator<einhard::LogLevel>()};
1969 detail::get_default_validator<einhard::LogLevel>()};
1985 detail::get_default_validator<einhard::LogLevel>()};
2001 detail::get_default_validator<einhard::LogLevel>()};
2017 detail::get_default_validator<einhard::LogLevel>()};
2033 detail::get_default_validator<einhard::LogLevel>()};
2049 detail::get_default_validator<einhard::LogLevel>()};
2068 detail::get_default_validator<einhard::LogLevel>()};
2084 detail::get_default_validator<einhard::LogLevel>()};
2100 detail::get_default_validator<einhard::LogLevel>()};
2116 detail::get_default_validator<einhard::LogLevel>()};
2132 detail::get_default_validator<einhard::LogLevel>()};
2148 detail::get_default_validator<einhard::LogLevel>()};
2164 detail::get_default_validator<einhard::LogLevel>()};
2180 detail::get_default_validator<einhard::LogLevel>()};
2196 detail::get_default_validator<einhard::LogLevel>()};
2212 detail::get_default_validator<einhard::LogLevel>()};
2228 detail::get_default_validator<einhard::LogLevel>()};
2244 detail::get_default_validator<einhard::LogLevel>()};
2260 detail::get_default_validator<einhard::LogLevel>()};
2276 detail::get_default_validator<einhard::LogLevel>()};
2292 detail::get_default_validator<einhard::LogLevel>()};
2308 detail::get_default_validator<einhard::LogLevel>()};
2324 detail::get_default_validator<einhard::LogLevel>()};
2340 detail::get_default_validator<einhard::LogLevel>()};
2356 detail::get_default_validator<einhard::LogLevel>()};
2373 detail::get_default_validator<einhard::LogLevel>()};
2389 detail::get_default_validator<einhard::LogLevel>()};
2401 {
"1.0",
"3.0",
"3.2"},
2402 detail::get_default_validator<std::string>()};
2419 [](
const double &value) noexcept {
2420 return value >= 0.0 && value <= 1.0;
2438 [](
const double &value) noexcept {
2439 return value >= 0.0 && value <= 1.0;
2460 [](
const double &value) noexcept {
2461 if (value < 0.0 || value > 300.0) {
2462 logg[LogArea::Configuration::id].warn(
2463 "The additional elastic cross section is set to a value that is "
2464 "either negative or very large,\nwhich may lead to nonphysical "
2465 "results. Make sure that this is intended.");
2513 detail::get_default_validator<CharmRescattering>()};
2564 detail::get_default_validator<CollisionCriterion>()};
2582 [](
const double &value) noexcept {
return value > 0.0; }};
2601 [](
const double &value) noexcept {
2602 return value >= 0.0 || value == -1.0;
2625 [](
const double &value) noexcept {
2647 [](
const double &value) noexcept {
return value > 0.0; }};
2663 detail::get_default_validator<bool>()};
2680 detail::get_default_validator<bool>()};
2731 detail::get_default_validator<ReactionsBitSet>()};
2746 {
"2.2",
"3.1",
"3.2"},
2747 detail::get_default_validator<bool>()};
2772 "Ignore_Minimum_Decay_Width_For_Decays_At_The_End",
2775 detail::get_default_validator<bool>()};
2790 detail::get_default_validator<bool>()};
2821 [](
const double &value) noexcept {
2822 if ((value < 200 && value > 0) || value > 2000) {
2823 logg[LogArea::Configuration::id].warn(
2824 "The maximum cross section is set to a value that is either "
2825 "smaller than 200 mb or larger than 2000 mb,\nwhich may lead to "
2826 "nonphysical results. Make sure that this is intended.");
2878 detail::get_default_validator<MultiParticleReactionsBitSet>()};
2904 detail::get_default_validator<NNbarTreatment>()};
2922 detail::get_default_validator<bool>()};
2941 detail::get_default_validator<bool>()};
2977 detail::get_default_validator<PseudoResonance>()};
3005 [](
const double &value) noexcept {
return value > 0.0; }};
3021 detail::get_default_validator<SpinInteractionType>()};
3038 detail::get_default_validator<bool>()};
3071 detail::get_default_validator<bool>()};
3107 detail::get_default_validator<TotalCrossSectionStrategy>()};
3122 detail::get_default_validator<bool>()};
3173 detail::get_default_validator<bool>()};
3203 detail::get_default_validator<HardStringTransitionMode>()};
3230 std::make_pair(10.0, 200.0),
3232 [](
const std::pair<double, double> &value) noexcept {
3233 return value.first >= 10.0 && value.first < value.second;
3252 [](
const double &value) noexcept {
3253 return value >= 1.0 && value <= 10.0;
3271 [](
const double &value) noexcept {
return value > 0.0; }};
3288 [](
const double &value) noexcept {
return value > 0.0; }};
3303 detail::get_default_validator<double>()};
3321 detail::get_default_validator<double>()};
3337 detail::get_default_validator<double>()};
3356 std::make_pair(3.5, 4.5),
3358 [](
const std::pair<double, double> &value) noexcept {
3360 value.first >= 2 *
nucleon_mass && value.first < value.second;
3361 if (valid && std::abs(value.second - value.first) != 1.0) {
3362 logg[LogArea::Configuration::id].warn(
3363 "The string transition range for NN collisions is set to a "
3364 "range larger than 1 GeV, which may lead to nonphysical\n"
3365 "results. Make sure that this is intended.");
3384 std::make_pair(1.9, 2.2),
3386 [](
const std::pair<double, double> &value) noexcept {
3388 value.first < value.second;
3406 detail::get_default_validator<double>()};
3423 [](
const double &value) noexcept {
3424 return value >= 0.0 && value <= 1.0;
3442 [](
const double &value) noexcept {
return value > 0.0; }};
3457 [](
const double &value) noexcept {
return value > 0.0; }};
3473 [](
const double &value) noexcept {
return value > 0.0; }};
3490 [](
const double &value) noexcept {
return value > 0.0; }};
3508 detail::get_default_validator<bool>()};
3524 [](
const double &value) noexcept {
return value > 0.0; }};
3540 [](
const double &value) noexcept {
return value > 0.0; }};
3559 [](
const double &value) noexcept {
3560 return value >= 0.0 && value <= 2.0;
3586 [](
const double &value) noexcept {
3587 return value >= 0.0 && value <= 1.0;
3608 detail::get_default_validator<double>()};
3626 [](
const double &value) noexcept {
return value > 0.0 && value <= 1.0; }};
3643 detail::get_default_validator<bool>()};
3664 [](
const double &value) noexcept {
return value > 0.0; }};
3686 [](
const double &value) noexcept {
3687 return value >= 0.0 && value <= 1.0;
3705 [](
const double &value) noexcept {
3706 return value >= 0.0 && value <= 1.0;
3726 [](
const double &value) noexcept {
return value >= 0.0; }};
3743 [](
const double &value) noexcept {
3744 return value >= 0.0 && value <= 2.0;
3763 [](
const double &value) noexcept {
3764 return value >= 0.0 && value <= 2.0;
3782 [](
const double &value) noexcept {
3783 return value >= 0.0 && value <= 2.0;
3803 [](
const double &value) noexcept {
3804 return value >= 0.2 && value <= 5.0;
3822 detail::get_default_validator<bool>()};
3851 [](
const double &value) noexcept {
3852 return value >= 0.0 && value <= 1.0;
3888 std::vector<std::string>{},
3890 detail::get_default_validator<std::vector<std::string>>()};
3911 detail::get_default_validator<bool>()};
3929 detail::get_default_validator<bool>()};
3954 detail::get_default_validator<DileptonBremsPionFormFactor>()};
3971 detail::get_default_validator<bool>()};
3987 detail::get_default_validator<bool>()};
4003 [](
const int &value) noexcept {
4004 if (value > 100'000) {
4005 logg[LogArea::Configuration::id].warn(
4006 "The number of fractional photons per perturbatively produced "
4007 "photon is set to a very large value, which may lead to long\n"
4008 "runtimes. Make sure that this is intended.");
4032 [](
const double &value) noexcept {
return value > 0; }};
4050 [](
const double &value) noexcept {
return value > 0; }};
4069 [](
const double &value) noexcept {
return value > 0; }};
4086 [](
const double &value) noexcept {
return value > 0; }};
4113 detail::get_default_validator<CalculationFrame>()};
4131 detail::get_default_validator<bool>()};
4150 detail::get_default_validator<FermiMotion>()};
4170 [](
const double &value) noexcept {
return value > 0; }};
4193 [](
const double &value) noexcept {
return value >= 0 && value <= 1; }};
4201 [](
const double &value) noexcept {
return value >= 0 && value <= 1; }};
4222 [](
const auto &value) noexcept {
4223 return !value.empty() &&
std::all_of(value.begin(), value.end(),
4224 [](
const auto &entry) {
4225 return entry.second > 0;
4235 [](
const auto &value) noexcept {
4236 return !value.empty() &&
std::all_of(value.begin(), value.end(),
4237 [](
const auto &entry) {
4238 return entry.second > 0;
4263 [](
const double &value) noexcept {
return value > 0; }};
4271 [](
const double &value) noexcept {
return value > 0; }};
4291 [](
const double &value) noexcept {
4292 return value >= 0.1 && value <= 0.2;
4301 [](
const double &value) noexcept {
4302 return value >= 0.1 && value <= 0.2;
4323 [](
const double &value) noexcept {
return value > 0; }};
4330 [](
const double &value) noexcept {
return value > 0; }};
4347 [](
const double &value) noexcept {
return value > 0; }};
4354 [](
const double &value) noexcept {
return value > 0; }};
4379 [](
const double &value) noexcept {
return value > 0; }};
4386 [](
const double &value) noexcept {
return value > 0; }};
4410 [](
const std::string &value) noexcept {
4411 return std::filesystem::is_directory(value);
4420 [](
const std::string &value) noexcept {
4421 return std::filesystem::is_directory(value);
4437 [](
const std::string &value) noexcept {
4438 if (value.empty() || value ==
"." || value ==
"..")
4441 return std::none_of(value.begin(), value.end(),
4442 [](
auto c) { return c ==
'/' || c ==
'\0'; });
4450 [](
const std::string &value) noexcept {
4451 if (value.empty() || value ==
"." || value ==
"..")
4454 return std::none_of(value.begin(), value.end(),
4455 [](
auto c) { return c ==
'/' || c ==
'\0'; });
4495 detail::get_default_validator<bool>()};
4502 detail::get_default_validator<bool>()};
4520 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4528 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4546 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4554 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4572 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4580 [](
const double &value) noexcept {
return value >= -1 && value <= 1; }};
4597 [](
const double &value) noexcept {
return value >= 0 && value <= M_PI; }};
4605 [](
const double &value) noexcept {
return value >= 0 && value <= M_PI; }};
4639 detail::get_default_validator<bool>()};
4646 detail::get_default_validator<bool>()};
4665 [](
const double &value) noexcept {
return value > 0; }};
4675 [](
const double &value) noexcept {
return value > 0; }};
4702 [](
const double &value) noexcept {
4703 return value >= 0 && value <= 2 * M_PI;
4712 [](
const double &value) noexcept {
4713 return value >= 0 && value <= 2 * M_PI;
4729 [](
const double &value) noexcept {
return value >= 0 && value <= M_PI; }};
4737 [](
const double &value) noexcept {
return value >= 0 && value <= M_PI; }};
4752 [](
const double &value) noexcept {
4753 return value >= 0 && value <= 2 * M_PI;
4762 [](
const double &value) noexcept {
4763 return value >= 0 && value <= 2 * M_PI;
4780 detail::get_default_validator<bool>()};
4788 detail::get_default_validator<bool>()};
4804 [](
const double &value) noexcept {
return value >= 0; }};
4821 detail::get_default_validator<bool>()};
4836 std::array<double, 2>{{0.0, 0.0}},
4838 [](
const std::array<double, 2> &value) noexcept {
4839 return value[0] >= 0 && value[1] >= 0;
4870 detail::get_default_validator<Sampling>()};
4886 [](
const double &value) noexcept {
return value >= 0; }};
4907 [](
const std::vector<double> &value) noexcept {
4909 value.begin(), value.end(),
4910 [](
const double entry) noexcept { return entry >= 0; });
4931 [](
const std::vector<double> &value) noexcept {
4933 value.begin(), value.end(),
4934 [](
const double entry) noexcept { return entry >= 0; });
4957 detail::get_default_validator<FluidizationType>()};
4976 [](
const double &value) noexcept {
return value > 0; }};
4999 [](
const double &value) noexcept {
return value > 0; }};
5019 [](
const double &value) noexcept {
return value > 0; }};
5040 [](
const double &value) noexcept {
return value >= 0; }};
5061 [](
const double &value) noexcept {
return value >= 0; }};
5081 [](
const double &value) noexcept {
return value > 0; }};
5099 [](
const double &value) noexcept {
return value >= 0; }};
5116 [](
const double &value) noexcept {
return value > 0; }};
5133 [](
const int &value) noexcept {
return value >= 2; }};
5163 detail::get_default_validator<FluidizableProcessesBitSet>()};
5182 detail::get_default_validator<bool>()};
5202 [](
const double &value) noexcept {
return value >= 0; }};
5227 [](
const auto &value) noexcept {
5228 return !value.empty() &&
std::all_of(value.begin(), value.end(),
5229 [](
const auto &entry) {
5230 return entry.second > 0;
5246 [](
const double &value) noexcept {
return value > 0.0; }};
5260 detail::get_default_validator<double>()};
5274 [](
const double &value) noexcept {
return value > 0.0; }};
5300 detail::get_default_validator<bool>()};
5324 [](
const double &value) noexcept {
5325 return value >= 0.0 && value <= 1.0;
5343 [](
const double &value) noexcept {
return value >= 0.0; }};
5362 detail::get_default_validator<double>()};
5381 detail::get_default_validator<double>()};
5408 detail::get_default_validator<SphereInitialCondition>()};
5426 detail::get_default_validator<double>()};
5453 detail::get_default_validator<double>()};
5478 detail::get_default_validator<bool>()};
5503 detail::get_default_validator<PdgCode>()};
5519 [](
const double &value) noexcept {
return value > 0.0; }};
5534 std::array<double, 3>{{0.0, 0.0, 0.0}},
5536 detail::get_default_validator<std::array<double, 3>>()};
5553 detail::get_default_validator<bool>()};
5572 [](
const double &value) noexcept {
return value > 0.0; }};
5595 [](
const auto &value) noexcept {
5596 return !value.empty() &&
std::all_of(value.begin(), value.end(),
5597 [](
const auto &entry) {
5598 return entry.second > 0;
5622 detail::get_default_validator<BoxInitialCondition>()};
5636 [](
const double &value) noexcept {
return value > 0.0; }};
5651 detail::get_default_validator<double>()};
5665 [](
const double &value) noexcept {
return value > 0.0; }};
5698 detail::get_default_validator<bool>()};
5716 detail::get_default_validator<double>()};
5734 detail::get_default_validator<double>()};
5754 detail::get_default_validator<double>()};
5772 detail::get_default_validator<double>()};
5790 detail::get_default_validator<bool>()};
5819 [](
const double &value) noexcept {
return value > 0.0; }};
5834 detail::get_default_validator<PdgCode>()};
5851 [](
const std::string &value) noexcept {
5852 return std::filesystem::is_directory(value);
5871 [](
const std::string &value) noexcept {
5872 if (value.empty() || value ==
"." || value ==
"..")
5875 return std::none_of(value.begin(), value.end(),
5876 [](
auto c) { return c ==
'/' || c ==
'\0'; });
5892 detail::get_default_validator<std::string>()};
5912 detail::get_default_validator<int>()};
5979 std::vector<std::string>{
"ID",
"charge"},
5981 [](
const std::vector<std::string> &value) noexcept {
5982 const std::set<std::string> valid_quantities{
"ID",
5995 "perturbative_weight"};
5997 value.begin(), value.end(),
5998 [&valid_quantities](
const std::string &quantity) {
5999 return valid_quantities.count(quantity) > 0;
6017 [](
const std::string &value) noexcept {
6018 return std::filesystem::is_directory(value);
6035 [](
const std::string &value) noexcept {
6036 if (value.empty() || value ==
"." || value ==
"..")
6039 return std::none_of(value.begin(), value.end(),
6040 [](
auto c) { return c ==
'/' || c ==
'\0'; });
6056 detail::get_default_validator<std::string>()};
6071 [](
const double &value) noexcept {
return value > 0.0; }};
6087 detail::get_default_validator<int>()};
6103 std::vector<std::string>{
"ID",
"charge"},
6105 [](
const std::vector<std::string> &value) noexcept {
6106 const std::set<std::string> valid_quantities{
"ID",
6119 "perturbative_weight"};
6121 value.begin(), value.end(),
6122 [&valid_quantities](
const std::string &quantity) {
6123 return valid_quantities.count(quantity) > 0;
6150 detail::get_default_validator<DensityType>()};
6168 [](
double x) noexcept {
return x > 0.0; }};
6196 detail::get_default_validator<std::vector<double>>()};
6236 [](
const std::vector<std::string> &values) noexcept {
6240 std::any_of(values.begin(), values.end(),
6241 [](
const std::string &s) { return s ==
"None"; });
6243 return values.size() == 1;
6244 std::set<std::string> allowed_set = {
6245 "ASCII",
"Oscar1999",
"Oscar2013",
"Binary",
6246 "Oscar2013_bin",
"Root",
"VTK",
"HepMC",
6247 "HepMC_asciiv3",
"HepMC_treeroot"};
6248 return std::none_of(values.begin(), values.end(),
6249 [&allowed_set](
const std::string &s) {
6250 return allowed_set.count(s) == 0;
6259 [](
const std::vector<std::string> &values) noexcept {
6263 std::any_of(values.begin(), values.end(),
6264 [](
const std::string &s) { return s ==
"None"; });
6266 return values.size() == 1;
6267 std::set<std::string> allowed_set = {
6268 "ASCII",
"Oscar1999",
"Oscar2013",
6269 "Binary",
"Oscar2013_bin",
"Root",
6270 "HepMC",
"HepMC_asciiv3",
"HepMC_treeroot"};
6271 return std::none_of(values.begin(), values.end(),
6272 [&allowed_set](
const std::string &s) {
6273 return allowed_set.count(s) == 0;
6282 [](
const std::vector<std::string> &values) noexcept {
6286 std::any_of(values.begin(), values.end(),
6287 [](
const std::string &s) { return s ==
"None"; });
6289 return values.size() == 1;
6290 std::set<std::string> allowed_set = {
"ASCII",
"Oscar1999",
6291 "Oscar2013",
"Binary",
6292 "Oscar2013_bin",
"Root"};
6293 return std::none_of(values.begin(), values.end(),
6294 [&allowed_set](
const std::string &s) {
6295 return allowed_set.count(s) == 0;
6304 [](
const std::vector<std::string> &values) noexcept {
6308 std::any_of(values.begin(), values.end(),
6309 [](
const std::string &s) { return s ==
"None"; });
6311 return values.size() == 1;
6312 std::set<std::string> allowed_set = {
"ASCII",
"Oscar1999",
6313 "Oscar2013",
"Binary",
6314 "Oscar2013_bin",
"Root"};
6315 return std::none_of(values.begin(), values.end(),
6316 [&allowed_set](
const std::string &s) {
6317 return allowed_set.count(s) == 0;
6327 [](
const std::vector<std::string> &values) noexcept {
6331 std::any_of(values.begin(), values.end(),
6332 [](
const std::string &s) { return s ==
"None"; });
6334 return values.size() == 1;
6335 std::set<std::string> allowed_set = {
6336 "For_vHLLE",
"ASCII",
"Oscar1999",
"Oscar2013",
6337 "Binary",
"Oscar2013_bin",
"Root"};
6338 return std::none_of(values.begin(), values.end(),
6339 [&allowed_set](
const std::string &s) {
6340 return allowed_set.count(s) == 0;
6349 [](
const std::vector<std::string> &values) noexcept {
6353 std::any_of(values.begin(), values.end(),
6354 [](
const std::string &s) { return s ==
"None"; });
6356 return values.size() == 1;
6357 std::set<std::string> allowed_set = {
"YODA",
"YODA-full"};
6358 return std::none_of(values.begin(), values.end(),
6359 [&allowed_set](
const std::string &s) {
6360 return allowed_set.count(s) == 0;
6369 [](
const std::vector<std::string> &values) noexcept {
6373 std::any_of(values.begin(), values.end(),
6374 [](
const std::string &s) { return s ==
"None"; });
6376 return values.size() == 1;
6377 std::set<std::string> allowed_set = {
"VTK"};
6378 return std::none_of(values.begin(), values.end(),
6379 [&allowed_set](
const std::string &s) {
6380 return allowed_set.count(s) == 0;
6390 [](
const std::vector<std::string> &values) noexcept {
6394 std::any_of(values.begin(), values.end(),
6395 [](
const std::string &s) { return s ==
"None"; });
6397 return values.size() == 1;
6398 std::set<std::string> allowed_set = {
"Lattice_ASCII",
"ASCII",
6399 "Lattice_Binary",
"VTK"};
6400 return std::none_of(values.begin(), values.end(),
6401 [&allowed_set](
const std::string &s) {
6402 return allowed_set.count(s) == 0;
6434 detail::get_default_validator<bool>()};
6451 std::vector<std::string>{},
6453 [](
const std::vector<std::string> &values) noexcept {
6456 const auto &allowed_set =
6458 return std::none_of(values.begin(), values.end(),
6459 [&allowed_set](
const std::string &s) {
6460 return allowed_set.count(s) == 0;
6483 detail::get_default_validator<OutputOnlyFinal>()};
6506 detail::get_default_validator<bool>()};
6524 std::vector<std::string>{},
6526 [](
const std::vector<std::string> &values) noexcept {
6529 const auto &allowed_set =
6531 return std::none_of(values.begin(), values.end(),
6532 [&allowed_set](
const std::string &s) {
6533 return allowed_set.count(s) == 0;
6553 detail::get_default_validator<bool>()};
6575 detail::get_default_validator<bool>()};
6592 std::vector<std::string>{},
6594 [](
const std::vector<std::string> &values) noexcept {
6597 const auto &allowed_set =
6599 return std::none_of(values.begin(), values.end(),
6600 [&allowed_set](
const std::string &s) {
6601 return allowed_set.count(s) == 0;
6625 detail::get_default_validator<bool>()};
6642 std::vector<std::string>{},
6644 [](
const std::vector<std::string> &values) noexcept {
6647 const auto &allowed_set =
6649 return std::none_of(values.begin(), values.end(),
6650 [&allowed_set](
const std::string &s) {
6651 return allowed_set.count(s) == 0;
6674 detail::get_default_validator<bool>()};
6692 std::vector<std::string>{},
6694 [](
const std::vector<std::string> &values) noexcept {
6697 const auto &allowed_set =
6699 return std::none_of(values.begin(), values.end(),
6700 [&allowed_set](
const std::string &s) {
6701 return allowed_set.count(s) == 0;
6718 {
"1.8",
"3.2",
"3.3"},
6719 detail::get_default_validator<double>()};
6734 {
"1.7",
"3.2",
"3.3"},
6735 detail::get_default_validator<double>()};
6750 {
"2.2",
"3.2",
"3.3"},
6751 detail::get_default_validator<double>()};
6766 {
"2.2",
"3.2",
"3.3"},
6767 detail::get_default_validator<double>()};
6793 detail::get_default_validator<std::vector<std::string>>()};
6809 detail::get_default_validator<std::array<double, 2>>()};
6827 detail::get_default_validator<bool>()};
6846 detail::get_default_validator<std::map<std::string, std::string>>()};
6863 detail::get_default_validator<std::vector<std::string>>()};
6881 detail::get_default_validator<std::vector<std::string>>()};
6902 detail::get_default_validator<double>()};
6919 detail::get_default_validator<std::vector<std::string>>()};
6936 detail::get_default_validator<double>()};
6952 detail::get_default_validator<bool>()};
6968 detail::get_default_validator<std::string>()};
6984 detail::get_default_validator<std::vector<std::string>>()};
7038 detail::get_default_validator<bool>()};
7062 detail::get_default_validator<bool>()};
7076 std::array<double, 3>{{0.0, 0.0, 0.0}},
7078 detail::get_default_validator<std::array<double, 3>>()};
7107 std::set<ThermodynamicQuantity>{},
7109 detail::get_default_validator<std::set<ThermodynamicQuantity>>()};
7149 detail::get_default_validator<bool>()};
7171 detail::get_default_validator<DensityType>()};
7202 detail::get_default_validator<bool>()};
7239 [](
const std::array<int, 3> &value) noexcept {
7240 if (std::abs(value[0] * value[1] * value[2]) > 15'000'000) {
7241 logg[LogArea::Configuration::id].warn(
7242 "Number of total cells for lattice is very large, which may "
7244 "to long runtime and/or large memory usage.\nMake sure this is "
7245 "intended (refer to the documentation for more information).");
7247 return value[0] > 0 && value[1] > 0 && value[2] > 0;
7270 detail::get_default_validator<std::array<double, 3>>()};
7290 detail::get_default_validator<bool>()};
7307 detail::get_default_validator<bool>()};
7334 [](
const std::array<double, 3> &value) noexcept {
7335 const int max = 200;
7336 if (value[0] > max || value[1] > max || value[2] > max) {
7337 logg[LogArea::Configuration::id].warn(
7339 " fm may lead to long runtime or large memory usage\nor even "
7340 "inaccurate results depending on the number of cells chosen.\n"
7341 "Make sure this is intended (refer to the documentation for "
7345 return value[0] > 0 && value[1] > 0 && value[2] > 0;
7364 detail::get_default_validator<bool>()};
7378 [](
const double &value) noexcept {
return value < 0; }};
7392 [](
const double &value) noexcept {
return value > 0; }};
7407 [](
const double &value) noexcept {
return value > 2.0 / 3.0; }};
7426 [](
const double &value) noexcept {
return value > 0; }};
7441 detail::get_default_validator<double>()};
7455 detail::get_default_validator<std::vector<double>>()};
7474 [](
const std::vector<double> &value) noexcept {
7476 [](
double x) { return x > 0; });
7492 [](
const double &value) noexcept {
7493 return value >= 0.13 && value <= 0.19;
7508 [](
const double &value) noexcept {
return value > 0; }};
7523 detail::get_default_validator<double>()};
7539 [](
const double &value) noexcept {
return value != 0; }};
7560 [](
const std::array<int, 3> &value) noexcept {
7561 const bool valid = value[0] > 0 && value[1] > 0 && value[2] > 0;
7562 if (valid && value[0] * value[1] * value[2] > 2'000'000) {
7563 logg[LogArea::Configuration::id].warn(
7564 "Number of total cells for forced thermalization is very "
7566 "which may lead to long runtime. Make sure this is intended.");
7586 [](
const double &value) noexcept {
return value > 0 && value <= 2; }};
7601 [](
const double &value) noexcept {
7602 if (value < 0 || value > 50) {
7603 logg[LogArea::Configuration::id].warn(
7604 "Start time for forced thermalization outside [0,50] is "
7605 "suspicious. Make sure this is intended.");
7624 [](
const double &value) noexcept {
return value > 0 && value <= 4; }};
7651 detail::get_default_validator<ThermalizationAlgorithm>()};
7674 [](
const std::array<double, 3> &value) noexcept {
7675 const int max = 200;
7676 if (value[0] > max || value[1] > max || value[2] > max) {
7677 logg[LogArea::Configuration::id].warn(
7678 "Lattice size(s) for forced thermalization larger than " +
7680 " fm may lead to long runtime. Make sure this is "
7683 return (value[0] > 0 && value[1] > 0 && value[2] > 0);
7709 detail::get_default_validator<bool>()};
7713 std::reference_wrapper<const Key<bool>>,
7714 std::reference_wrapper<const Key<int>>,
7715 std::reference_wrapper<const Key<int64_t>>,
7716 std::reference_wrapper<const Key<double>>,
7717 std::reference_wrapper<const Key<std::string>>,
7718 std::reference_wrapper<const Key<std::array<int, 3>>>,
7719 std::reference_wrapper<const Key<std::array<double, 2>>>,
7720 std::reference_wrapper<const Key<std::array<double, 3>>>,
7721 std::reference_wrapper<const Key<std::pair<double, double>>>,
7722 std::reference_wrapper<const Key<std::vector<double>>>,
7723 std::reference_wrapper<const Key<std::vector<std::string>>>,
7724 std::reference_wrapper<const Key<std::set<ThermodynamicQuantity>>>,
7725 std::reference_wrapper<const Key<std::map<PdgCode, int>>>,
7726 std::reference_wrapper<const Key<std::map<std::string, std::string>>>,
7727 std::reference_wrapper<const Key<einhard::LogLevel>>,
7728 std::reference_wrapper<const Key<BoxInitialCondition>>,
7729 std::reference_wrapper<const Key<CalculationFrame>>,
7730 std::reference_wrapper<const Key<CharmRescattering>>,
7731 std::reference_wrapper<const Key<CollisionCriterion>>,
7732 std::reference_wrapper<const Key<DensityType>>,
7733 std::reference_wrapper<const Key<DerivativesMode>>,
7734 std::reference_wrapper<const Key<ExpansionMode>>,
7735 std::reference_wrapper<const Key<FermiMotion>>,
7736 std::reference_wrapper<const Key<DileptonBremsPionFormFactor>>,
7737 std::reference_wrapper<const Key<FieldDerivativesMode>>,
7738 std::reference_wrapper<const Key<FluidizableProcessesBitSet>>,
7739 std::reference_wrapper<const Key<FluidizationType>>,
7740 std::reference_wrapper<const Key<MultiParticleReactionsBitSet>>,
7741 std::reference_wrapper<const Key<SpinInteractionType>>,
7742 std::reference_wrapper<const Key<NNbarTreatment>>,
7743 std::reference_wrapper<const Key<OutputOnlyFinal>>,
7744 std::reference_wrapper<const Key<PdgCode>>,
7745 std::reference_wrapper<const Key<PseudoResonance>>,
7746 std::reference_wrapper<const Key<ReactionsBitSet>>,
7747 std::reference_wrapper<const Key<RestFrameDensityDerivativesMode>>,
7748 std::reference_wrapper<const Key<Sampling>>,
7749 std::reference_wrapper<const Key<SmearingMode>>,
7750 std::reference_wrapper<const Key<SphereInitialCondition>>,
7751 std::reference_wrapper<const Key<ThermalizationAlgorithm>>,
7752 std::reference_wrapper<const Key<TimeStepMode>>,
7753 std::reference_wrapper<const Key<HardStringTransitionMode>>,
7754 std::reference_wrapper<const Key<TotalCrossSectionStrategy>>>;
7765 static const std::vector<key_references_variant> &
all_keys();
7774 return get_key_reference<einhard::LogLevel>({
"Logging", std::string{area}});
7784 std::string_view content) {
7785 return get_key_reference<std::vector<std::string>>(
7786 {
"Output", std::string{content},
"Format"});
7803 template <
typename T>
7805 using key_reference = std::reference_wrapper<const Key<T>>;
7807 if (candidate.has_value()) {
7808 return std::get<key_reference>(candidate.value());
7810 throw std::invalid_argument(
"No database key with keys \"" +
7811 join(labels,
": ") +
"\" was found.");
7823 static std::optional<key_references_variant>
find_key(
default_type default_value() const
Get the default value of the key.
Collection of useful constants that are known at compile time.
This is the main include file for Einhard.
@ Off
Don't use form factors, i.e. multiply by 1.
@ Off
Don't use fermi motion.
@ Strings
Use string fragmentation.
@ Resonances
Charm interactions via resonances.
@ Fixed
Use fixed time step.
@ Exponential
Legacy exponential splitting based on the hard string cross section.
std::bitset< 5 > FluidizableProcessesBitSet
@ TopDownMeasured
Mix the two above, using the parametrizations only for measured processes, and summing up partials fo...
@ Quadratic
Sample from areal / quadratic distribution.
std::bitset< 4 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
@ Covariant
Covariant Criterion.
@ ThermalMomentaBoltzmann
A thermalized ensemble is generated, with momenta sampled from a Maxwell-Boltzmann distribution.
@ LargestFromUnstable
Heaviest possible resonance from processes with at least one resonance in the incoming particles.
std::bitset< 11 > ReactionsBitSet
Container for the 2 to 2 reactions in the code.
@ Yes
Print only final-state particles.
@ Off
No spin interactions.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > & logg
An array that stores all pre-configured Logger objects.
@ Dependent
Default value which depends on other keys
std::vector< std::string_view > KeyLabels
Descriptive alias for storing key labels, i.e.
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
std::string to_string(ThermodynamicQuantity quantity)
Convert a ThermodynamicQuantity enum value to its corresponding string.
constexpr double nucleon_mass
Nucleon mass in GeV.
constexpr double pion_mass
Pion mass in GeV.
std::string join(const std::vector< std::string > &v, std::string_view delim)
Join strings using delimiter.
std::variant< std::reference_wrapper< const Key< bool > >, std::reference_wrapper< const Key< int > >, std::reference_wrapper< const Key< int64_t > >, std::reference_wrapper< const Key< double > >, std::reference_wrapper< const Key< std::string > >, std::reference_wrapper< const Key< std::array< int, 3 > >>, std::reference_wrapper< const Key< std::array< double, 2 > >>, std::reference_wrapper< const Key< std::array< double, 3 > >>, std::reference_wrapper< const Key< std::pair< double, double > >>, std::reference_wrapper< const Key< std::vector< double > >>, std::reference_wrapper< const Key< std::vector< std::string > >>, std::reference_wrapper< const Key< std::set< ThermodynamicQuantity > >>, std::reference_wrapper< const Key< std::map< PdgCode, int > >>, std::reference_wrapper< const Key< std::map< std::string, std::string > >>, std::reference_wrapper< const Key< einhard::LogLevel > >, std::reference_wrapper< const Key< BoxInitialCondition > >, std::reference_wrapper< const Key< CalculationFrame > >, std::reference_wrapper< const Key< CharmRescattering > >, std::reference_wrapper< const Key< CollisionCriterion > >, std::reference_wrapper< const Key< DensityType > >, std::reference_wrapper< const Key< DerivativesMode > >, std::reference_wrapper< const Key< ExpansionMode > >, std::reference_wrapper< const Key< FermiMotion > >, std::reference_wrapper< const Key< DileptonBremsPionFormFactor > >, std::reference_wrapper< const Key< FieldDerivativesMode > >, std::reference_wrapper< const Key< FluidizableProcessesBitSet > >, std::reference_wrapper< const Key< FluidizationType > >, std::reference_wrapper< const Key< MultiParticleReactionsBitSet > >, std::reference_wrapper< const Key< SpinInteractionType > >, std::reference_wrapper< const Key< NNbarTreatment > >, std::reference_wrapper< const Key< OutputOnlyFinal > >, std::reference_wrapper< const Key< PdgCode > >, std::reference_wrapper< const Key< PseudoResonance > >, std::reference_wrapper< const Key< ReactionsBitSet > >, std::reference_wrapper< const Key< RestFrameDensityDerivativesMode > >, std::reference_wrapper< const Key< Sampling > >, std::reference_wrapper< const Key< SmearingMode > >, std::reference_wrapper< const Key< SphereInitialCondition > >, std::reference_wrapper< const Key< ThermalizationAlgorithm > >, std::reference_wrapper< const Key< TimeStepMode > >, std::reference_wrapper< const Key< HardStringTransitionMode > >, std::reference_wrapper< const Key< TotalCrossSectionStrategy > >> key_references_variant
Alias for the type to be used in the list of keys.