GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/common/parameters.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 8 12 66.7%
Functions: 401 434 92.4%
Branches: 216 914 23.6%

Line Branch Exec Source
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 //
4 // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 /*!
8 * \file
9 * \ingroup Parameter
10 * \brief The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
11 */
12 #ifndef DUMUX_PARAMETERS_HH
13 #define DUMUX_PARAMETERS_HH
14
15 #include <iostream>
16 #include <list>
17 #include <sstream>
18 #include <unordered_map>
19 #include <fstream>
20 #include <functional>
21
22 #include <dune/common/parametertree.hh>
23
24 #include <dumux/common/defaultusagemessage.hh>
25 #include <dumux/common/loggingparametertree.hh>
26
27 namespace Dumux {
28
29 /*!
30 * \ingroup Parameter
31 * \brief Parameter class managing runtime input parameters
32 * \todo Doc me!
33 */
34 class Parameters {
35
36 using DefaultParams = std::function<void (Dune::ParameterTree&)>;
37 using Usage = std::function<void (const char *, const std::string &)>;
38
39 public:
40
41 //! Initialize the parameter tree singletons
42 static void init(int argc, char **argv, const Usage& usage);
43
44 //! Initialize the parameter tree singletons
45 static void init(int argc, char **argv,
46 std::string parameterFileName,
47 const Usage& usage = [](const char *, const std::string &){});
48
49 //! Initialize the parameter tree singletons
50 static void init(int argc, char **argv,
51 const DefaultParams& defaultParams,
52 const Usage& usage);
53
54 /*!
55 * \brief Initialize the parameter tree
56 * \param argc number of command line argument (forwarded from main)
57 * \param argv command line argument (forwarded from main)
58 * \param defaultParams a function that sets parameters of the default runtime parameter tree
59 * \param parameterFileName the file name of the input file
60 * \param usage the usage function to print if the help option was passed on the command line
61 * \note the default parameter tree is initialized in the following way
62 * 1) global defaults (see member function applyGlobalDefaults_)
63 * 2) user provided defaults (overwrite global defaults)
64 * the parameter tree is initialized in the following way
65 * 1) parameters from the input file
66 * 2) parameters from the command line (overwrite input file parameters)
67 * \note if a parameter is looked up without explicitly providing a default, the
68 * default tree is consulted if the parameter could not be found in the parameter tree
69 */
70 static void init(int argc, char **argv,
71 const DefaultParams& defaultParams = [] (Dune::ParameterTree&) {},
72 std::string parameterFileName = "",
73 const Usage& usage = [](const char *, const std::string &){});
74
75 /*!
76 * \brief Initialize the parameter tree
77 * \param params a function that sets parameters of the runtime parameter tree
78 * \param defaultParams a function that sets parameters of the default runtim parameter tree
79 * \note if a parameter is looked up without explicitly providing a default, the
80 * default tree is consulted if the parameter could not be found in the parameter tree
81 */
82 static void init(const DefaultParams& params = [] (Dune::ParameterTree&) {},
83 const DefaultParams& defaultParams = [] (Dune::ParameterTree&) {});
84
85 /*!
86 * \brief Initialize the parameter tree
87 * \param parameterFileName an input parameter file name
88 * \param params a parameter tree with runtime parameters
89 * \param inputFileOverwritesParams if set to true (default) the parameters from the input file have precedence,
90 * if set to false the input the parameters provided via params have precedence
91 * \param defaultParams a parameter tree with default parameters
92 * \note the params function overwrites
93 * \note if a parameter is looked up without explicitly providing a default, the
94 * default tree is consulted if the parameter could not be found in the parameter tree
95 */
96 static void init(const std::string& parameterFileName,
97 const DefaultParams& params = [] (Dune::ParameterTree&) {},
98 bool inputFileOverwritesParams = true,
99 const DefaultParams& defaultParams = [] (Dune::ParameterTree&) {});
100
101 //! prints all used and unused parameters
102 static void print();
103
104 //! Parse command line arguments into a parameter tree
105 static Dune::ParameterTree parseCommandLine(int argc, char **argv);
106
107 /*!
108 * \brief Get the parameter tree
109 *
110 * The logging parameter tree recording which parameters are used during the simulation
111 */
112 static const LoggingParameterTree& getTree();
113
114 private:
115 //! the actual internal parameter tree storing all user-specfied runtime parameters
116 static Dune::ParameterTree& paramTree_();
117
118 //! the parameter tree storing the Dumux global defaults for some parameters
119 static Dune::ParameterTree& defaultParamTree_();
120
121 //! This method puts all default arguments into the parameter tree
122 //! we do this once per simulation on call to Parameters::init();
123 static void applyGlobalDefaults_(Dune::ParameterTree& params);
124
125 //! merge source into target tree
126 static void mergeTree_(Dune::ParameterTree& target, const Dune::ParameterTree& source, bool overwrite = true);
127
128 //! recursively merge all elements
129 static void mergeTreeImpl_(Dune::ParameterTree& target, const Dune::ParameterTree& source, bool overwrite, const std::string& group);
130 };
131
132 /*!
133 * \ingroup Parameter
134 * \brief A free function to get a parameter from the parameter tree singleton
135 * \note \code auto endTime = getParam<double>("TimeManager.TEnd"); \endcode
136 * \note Once this has been called the first time, you cannot modify the parameter tree anymore
137 */
138 template<typename T = std::string, typename... Args>
139 27240 T getParam(Args&&... args)
140
25/40
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 13642 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 5 times.
✓ Branch 5 taken 13642 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5 times.
✓ Branch 8 taken 13642 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 7732 times.
✓ Branch 11 taken 5915 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 6 times.
✓ Branch 14 taken 33 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 27 times.
✓ Branch 17 taken 11 times.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 37 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 32 times.
✓ Branch 22 taken 5 times.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 1 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 1 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 1 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 1 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
58250 { return Parameters::getTree().template get<T>(std::forward<Args>(args)... ); }
141
142 /*!
143 * \ingroup Parameter
144 * \brief A free function to get a parameter from the parameter tree singleton with a model group
145 * \note \code auto endTime = getParamFromGroup<double>("FreeFlow", "TimeManager.TEnd"); \endcode
146 * \note Once this has been called the first time, you cannot modify the parameter tree anymore
147 */
148 template<typename T = std::string, typename... Args>
149 43016 T getParamFromGroup(Args&&... args)
150
125/236
✓ Branch 1 taken 476 times.
✓ Branch 2 taken 21019 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 476 times.
✓ Branch 5 taken 21019 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 476 times.
✓ Branch 8 taken 21019 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 15507 times.
✓ Branch 11 taken 5988 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 472 times.
✓ Branch 14 taken 1729 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 703 times.
✓ Branch 17 taken 1498 times.
✓ Branch 18 taken 24 times.
✓ Branch 19 taken 2195 times.
✓ Branch 20 taken 24 times.
✓ Branch 21 taken 1705 times.
✓ Branch 22 taken 490 times.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 491 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 491 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 480 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 480 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 480 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 480 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 473 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 473 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 515 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 515 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 514 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 514 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 460 times.
✓ Branch 62 taken 22 times.
✗ Branch 63 not taken.
✓ Branch 64 taken 460 times.
✓ Branch 65 taken 22 times.
✗ Branch 66 not taken.
✓ Branch 67 taken 460 times.
✓ Branch 68 taken 22 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 460 times.
✓ Branch 71 taken 22 times.
✗ Branch 72 not taken.
✓ Branch 73 taken 469 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 469 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 469 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 469 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 469 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 469 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 468 times.
✗ Branch 92 not taken.
✓ Branch 94 taken 468 times.
✗ Branch 95 not taken.
✓ Branch 97 taken 474 times.
✗ Branch 98 not taken.
✓ Branch 100 taken 474 times.
✗ Branch 101 not taken.
✓ Branch 103 taken 474 times.
✗ Branch 104 not taken.
✓ Branch 106 taken 474 times.
✗ Branch 107 not taken.
✓ Branch 109 taken 473 times.
✗ Branch 110 not taken.
✓ Branch 112 taken 473 times.
✗ Branch 113 not taken.
✓ Branch 115 taken 442 times.
✗ Branch 116 not taken.
✓ Branch 118 taken 442 times.
✗ Branch 119 not taken.
✓ Branch 121 taken 134 times.
✗ Branch 122 not taken.
✓ Branch 124 taken 134 times.
✗ Branch 125 not taken.
✓ Branch 127 taken 138 times.
✗ Branch 128 not taken.
✓ Branch 130 taken 138 times.
✗ Branch 131 not taken.
✓ Branch 133 taken 140 times.
✗ Branch 134 not taken.
✓ Branch 136 taken 140 times.
✗ Branch 137 not taken.
✓ Branch 139 taken 27 times.
✗ Branch 140 not taken.
✓ Branch 142 taken 27 times.
✗ Branch 143 not taken.
✓ Branch 145 taken 23 times.
✗ Branch 146 not taken.
✓ Branch 148 taken 23 times.
✗ Branch 149 not taken.
✓ Branch 151 taken 23 times.
✗ Branch 152 not taken.
✓ Branch 154 taken 23 times.
✗ Branch 155 not taken.
✓ Branch 157 taken 27 times.
✗ Branch 158 not taken.
✓ Branch 160 taken 27 times.
✗ Branch 161 not taken.
✓ Branch 163 taken 27 times.
✗ Branch 164 not taken.
✓ Branch 166 taken 27 times.
✗ Branch 167 not taken.
✓ Branch 169 taken 21 times.
✗ Branch 170 not taken.
✓ Branch 172 taken 21 times.
✗ Branch 173 not taken.
✓ Branch 175 taken 21 times.
✗ Branch 176 not taken.
✓ Branch 178 taken 21 times.
✗ Branch 179 not taken.
✓ Branch 181 taken 23 times.
✗ Branch 182 not taken.
✓ Branch 184 taken 23 times.
✗ Branch 185 not taken.
✓ Branch 187 taken 23 times.
✗ Branch 188 not taken.
✓ Branch 190 taken 23 times.
✗ Branch 191 not taken.
✓ Branch 193 taken 23 times.
✗ Branch 194 not taken.
✓ Branch 196 taken 23 times.
✗ Branch 197 not taken.
✓ Branch 199 taken 23 times.
✗ Branch 200 not taken.
✓ Branch 202 taken 23 times.
✗ Branch 203 not taken.
✓ Branch 205 taken 29 times.
✗ Branch 206 not taken.
✓ Branch 208 taken 29 times.
✗ Branch 209 not taken.
✓ Branch 211 taken 29 times.
✗ Branch 212 not taken.
✓ Branch 214 taken 29 times.
✗ Branch 215 not taken.
✓ Branch 217 taken 16 times.
✗ Branch 218 not taken.
✓ Branch 220 taken 16 times.
✗ Branch 221 not taken.
✓ Branch 223 taken 16 times.
✗ Branch 224 not taken.
✓ Branch 226 taken 16 times.
✗ Branch 227 not taken.
✓ Branch 229 taken 18 times.
✗ Branch 230 not taken.
✓ Branch 232 taken 18 times.
✗ Branch 233 not taken.
✓ Branch 235 taken 7 times.
✗ Branch 236 not taken.
✓ Branch 238 taken 7 times.
✗ Branch 239 not taken.
✓ Branch 241 taken 19 times.
✗ Branch 242 not taken.
✓ Branch 244 taken 19 times.
✗ Branch 245 not taken.
✓ Branch 247 taken 19 times.
✗ Branch 248 not taken.
✓ Branch 250 taken 19 times.
✗ Branch 251 not taken.
✓ Branch 253 taken 3 times.
✗ Branch 254 not taken.
✓ Branch 256 taken 3 times.
✗ Branch 257 not taken.
✓ Branch 259 taken 3 times.
✗ Branch 260 not taken.
✓ Branch 262 taken 3 times.
✗ Branch 263 not taken.
✓ Branch 265 taken 11 times.
✗ Branch 266 not taken.
✓ Branch 268 taken 11 times.
✗ Branch 269 not taken.
✓ Branch 271 taken 9 times.
✗ Branch 272 not taken.
✓ Branch 274 taken 9 times.
✗ Branch 275 not taken.
✓ Branch 277 taken 9 times.
✗ Branch 278 not taken.
✓ Branch 280 taken 9 times.
✗ Branch 281 not taken.
✓ Branch 283 taken 9 times.
✗ Branch 284 not taken.
✓ Branch 286 taken 9 times.
✗ Branch 287 not taken.
✓ Branch 289 taken 1 times.
✗ Branch 290 not taken.
✓ Branch 292 taken 1 times.
✗ Branch 293 not taken.
✓ Branch 295 taken 1 times.
✗ Branch 296 not taken.
✓ Branch 298 taken 1 times.
✗ Branch 299 not taken.
✓ Branch 301 taken 1 times.
✗ Branch 302 not taken.
✓ Branch 304 taken 1 times.
✗ Branch 305 not taken.
✓ Branch 307 taken 1 times.
✗ Branch 308 not taken.
✓ Branch 310 taken 1 times.
✗ Branch 311 not taken.
✓ Branch 313 taken 1 times.
✗ Branch 314 not taken.
✓ Branch 316 taken 1 times.
✗ Branch 317 not taken.
✓ Branch 319 taken 1 times.
✗ Branch 320 not taken.
✓ Branch 322 taken 1 times.
✗ Branch 323 not taken.
✓ Branch 325 taken 1 times.
✗ Branch 326 not taken.
✓ Branch 328 taken 1 times.
✗ Branch 329 not taken.
✓ Branch 331 taken 1 times.
✗ Branch 332 not taken.
✓ Branch 334 taken 1 times.
✗ Branch 335 not taken.
114561 { return Parameters::getTree().template getFromGroup<T>(std::forward<Args>(args)... ); }
151
152 /*!
153 * \ingroup Parameter
154 * \brief Check whether a key exists in the parameter tree
155 * \note Once this has been called the first time, you cannot modify the parameter tree anymore
156 */
157 inline bool hasParam(const std::string& param)
158
24/280
✓ Branch 1 taken 593 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 593 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 444 times.
✓ Branch 7 taken 132 times.
✓ Branch 8 taken 17 times.
✓ Branch 9 taken 5748 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 17 times.
✓ Branch 12 taken 5748 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 5713 times.
✓ Branch 15 taken 50 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 418448 times.
✓ Branch 18 taken 15 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 418463 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 418435 times.
✓ Branch 23 taken 302 times.
✗ Branch 24 not taken.
✓ Branch 25 taken 144 times.
✓ Branch 26 taken 289 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 144 times.
✓ Branch 29 taken 289 times.
✓ Branch 30 taken 131 times.
✓ Branch 31 taken 13 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 2 times.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
✓ Branch 36 taken 2 times.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✓ Branch 39 taken 2 times.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 60 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 76 not taken.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 92 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✗ Branch 108 not taken.
✗ Branch 109 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 116 not taken.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✗ Branch 124 not taken.
✗ Branch 125 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✗ Branch 132 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 153 not taken.
✗ Branch 154 not taken.
✗ Branch 156 not taken.
✗ Branch 157 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 161 not taken.
✗ Branch 162 not taken.
✗ Branch 164 not taken.
✗ Branch 165 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 172 not taken.
✗ Branch 173 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 185 not taken.
✗ Branch 186 not taken.
✗ Branch 188 not taken.
✗ Branch 189 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✗ Branch 198 not taken.
✗ Branch 199 not taken.
✗ Branch 201 not taken.
✗ Branch 202 not taken.
✗ Branch 204 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✗ Branch 225 not taken.
✗ Branch 226 not taken.
✗ Branch 228 not taken.
✗ Branch 229 not taken.
✗ Branch 230 not taken.
✗ Branch 231 not taken.
✗ Branch 233 not taken.
✗ Branch 234 not taken.
✗ Branch 236 not taken.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 249 not taken.
✗ Branch 250 not taken.
✗ Branch 252 not taken.
✗ Branch 253 not taken.
✗ Branch 254 not taken.
✗ Branch 255 not taken.
✗ Branch 257 not taken.
✗ Branch 258 not taken.
✗ Branch 260 not taken.
✗ Branch 261 not taken.
✗ Branch 262 not taken.
✗ Branch 263 not taken.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 273 not taken.
✗ Branch 274 not taken.
✗ Branch 276 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 281 not taken.
✗ Branch 282 not taken.
✗ Branch 284 not taken.
✗ Branch 285 not taken.
✗ Branch 286 not taken.
✗ Branch 287 not taken.
✗ Branch 289 not taken.
✗ Branch 290 not taken.
✗ Branch 292 not taken.
✗ Branch 293 not taken.
✗ Branch 294 not taken.
✗ Branch 295 not taken.
✗ Branch 297 not taken.
✗ Branch 298 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✗ Branch 305 not taken.
✗ Branch 306 not taken.
✗ Branch 308 not taken.
✗ Branch 309 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 316 not taken.
✗ Branch 317 not taken.
✗ Branch 318 not taken.
✗ Branch 319 not taken.
✗ Branch 321 not taken.
✗ Branch 322 not taken.
✗ Branch 324 not taken.
✗ Branch 325 not taken.
✗ Branch 326 not taken.
✗ Branch 327 not taken.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 345 not taken.
✗ Branch 346 not taken.
✗ Branch 348 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 353 not taken.
✗ Branch 354 not taken.
✗ Branch 356 not taken.
✗ Branch 357 not taken.
✗ Branch 358 not taken.
✗ Branch 359 not taken.
425256 { return Parameters::getTree().hasKey(param); }
159
160 /*!
161 * \ingroup Parameter
162 * \brief Check whether a key exists in the parameter tree with a model group prefix
163 * \note Once this has been called the first time, you cannot modify the parameter tree anymore
164 */
165 inline bool hasParamInGroup(const std::string& paramGroup, const std::string& param)
166
40/352
✓ Branch 1 taken 576 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 563 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 557 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 542 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 437 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 437 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 425 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 388 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 209 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 193 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 137 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 83 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 72 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 74 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 74 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 56 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 60 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 58 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 33 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 9 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 7 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 2 times.
✗ Branch 65 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✓ Branch 73 taken 2 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 2 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 6 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 6 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 2 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 2 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 8 times.
✗ Branch 92 not taken.
✓ Branch 94 taken 8 times.
✗ Branch 95 not taken.
✓ Branch 97 taken 8 times.
✗ Branch 98 not taken.
✓ Branch 100 taken 8 times.
✗ Branch 101 not taken.
✓ Branch 103 taken 8 times.
✗ Branch 104 not taken.
✓ Branch 106 taken 8 times.
✗ Branch 107 not taken.
✓ Branch 109 taken 4 times.
✗ Branch 110 not taken.
✓ Branch 112 taken 4 times.
✗ Branch 113 not taken.
✓ Branch 115 taken 4 times.
✗ Branch 116 not taken.
✓ Branch 118 taken 4 times.
✗ Branch 119 not taken.
✓ Branch 121 taken 10 times.
✗ Branch 122 not taken.
✓ Branch 124 taken 10 times.
✗ Branch 125 not taken.
✗ Branch 127 not taken.
✗ Branch 128 not taken.
✗ Branch 130 not taken.
✗ Branch 131 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 151 not taken.
✗ Branch 152 not taken.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 157 not taken.
✗ Branch 158 not taken.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 172 not taken.
✗ Branch 173 not taken.
✗ Branch 175 not taken.
✗ Branch 176 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 184 not taken.
✗ Branch 185 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✗ Branch 199 not taken.
✗ Branch 200 not taken.
✗ Branch 202 not taken.
✗ Branch 203 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 208 not taken.
✗ Branch 209 not taken.
✗ Branch 211 not taken.
✗ Branch 212 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 223 not taken.
✗ Branch 224 not taken.
✗ Branch 226 not taken.
✗ Branch 227 not taken.
✗ Branch 229 not taken.
✗ Branch 230 not taken.
✗ Branch 232 not taken.
✗ Branch 233 not taken.
✗ Branch 235 not taken.
✗ Branch 236 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 247 not taken.
✗ Branch 248 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✗ Branch 253 not taken.
✗ Branch 254 not taken.
✗ Branch 256 not taken.
✗ Branch 257 not taken.
✗ Branch 259 not taken.
✗ Branch 260 not taken.
✗ Branch 262 not taken.
✗ Branch 263 not taken.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 271 not taken.
✗ Branch 272 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 280 not taken.
✗ Branch 281 not taken.
✗ Branch 283 not taken.
✗ Branch 284 not taken.
✗ Branch 286 not taken.
✗ Branch 287 not taken.
✗ Branch 289 not taken.
✗ Branch 290 not taken.
✗ Branch 292 not taken.
✗ Branch 293 not taken.
✗ Branch 295 not taken.
✗ Branch 296 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 304 not taken.
✗ Branch 305 not taken.
✗ Branch 307 not taken.
✗ Branch 308 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 316 not taken.
✗ Branch 317 not taken.
✗ Branch 319 not taken.
✗ Branch 320 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 325 not taken.
✗ Branch 326 not taken.
✗ Branch 328 not taken.
✗ Branch 329 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 343 not taken.
✗ Branch 344 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 352 not taken.
✗ Branch 353 not taken.
✗ Branch 355 not taken.
✗ Branch 356 not taken.
✗ Branch 358 not taken.
✗ Branch 359 not taken.
✗ Branch 361 not taken.
✗ Branch 362 not taken.
✗ Branch 364 not taken.
✗ Branch 365 not taken.
✗ Branch 367 not taken.
✗ Branch 368 not taken.
✗ Branch 370 not taken.
✗ Branch 371 not taken.
✗ Branch 373 not taken.
✗ Branch 374 not taken.
✗ Branch 376 not taken.
✗ Branch 377 not taken.
✗ Branch 379 not taken.
✗ Branch 380 not taken.
✗ Branch 382 not taken.
✗ Branch 383 not taken.
✗ Branch 385 not taken.
✗ Branch 386 not taken.
✗ Branch 388 not taken.
✗ Branch 389 not taken.
✗ Branch 391 not taken.
✗ Branch 392 not taken.
✗ Branch 394 not taken.
✗ Branch 395 not taken.
✗ Branch 397 not taken.
✗ Branch 398 not taken.
✗ Branch 400 not taken.
✗ Branch 401 not taken.
✗ Branch 403 not taken.
✗ Branch 404 not taken.
✗ Branch 406 not taken.
✗ Branch 407 not taken.
✗ Branch 409 not taken.
✗ Branch 410 not taken.
✗ Branch 412 not taken.
✗ Branch 413 not taken.
✗ Branch 415 not taken.
✗ Branch 416 not taken.
✗ Branch 418 not taken.
✗ Branch 419 not taken.
✗ Branch 421 not taken.
✗ Branch 422 not taken.
✗ Branch 424 not taken.
✗ Branch 425 not taken.
✗ Branch 427 not taken.
✗ Branch 428 not taken.
✗ Branch 430 not taken.
✗ Branch 431 not taken.
✗ Branch 433 not taken.
✗ Branch 434 not taken.
✗ Branch 436 not taken.
✗ Branch 437 not taken.
✗ Branch 439 not taken.
✗ Branch 440 not taken.
✗ Branch 442 not taken.
✗ Branch 443 not taken.
✗ Branch 445 not taken.
✗ Branch 446 not taken.
✗ Branch 448 not taken.
✗ Branch 449 not taken.
✗ Branch 451 not taken.
✗ Branch 452 not taken.
✗ Branch 454 not taken.
✗ Branch 455 not taken.
✗ Branch 457 not taken.
✗ Branch 458 not taken.
✗ Branch 460 not taken.
✗ Branch 461 not taken.
✗ Branch 463 not taken.
✗ Branch 464 not taken.
✗ Branch 466 not taken.
✗ Branch 467 not taken.
✗ Branch 469 not taken.
✗ Branch 470 not taken.
✗ Branch 472 not taken.
✗ Branch 473 not taken.
✗ Branch 475 not taken.
✗ Branch 476 not taken.
✗ Branch 478 not taken.
✗ Branch 479 not taken.
✗ Branch 481 not taken.
✗ Branch 482 not taken.
✗ Branch 484 not taken.
✗ Branch 485 not taken.
✗ Branch 487 not taken.
✗ Branch 488 not taken.
✗ Branch 490 not taken.
✗ Branch 491 not taken.
✗ Branch 493 not taken.
✗ Branch 494 not taken.
✗ Branch 496 not taken.
✗ Branch 497 not taken.
✗ Branch 499 not taken.
✗ Branch 500 not taken.
✗ Branch 502 not taken.
✗ Branch 503 not taken.
✗ Branch 505 not taken.
✗ Branch 506 not taken.
✗ Branch 508 not taken.
✗ Branch 509 not taken.
✗ Branch 511 not taken.
✗ Branch 512 not taken.
✗ Branch 514 not taken.
✗ Branch 515 not taken.
✗ Branch 517 not taken.
✗ Branch 518 not taken.
✗ Branch 520 not taken.
✗ Branch 521 not taken.
✗ Branch 523 not taken.
✗ Branch 524 not taken.
✗ Branch 526 not taken.
✗ Branch 527 not taken.
2639 { return Parameters::getTree().hasKeyInGroup(param, paramGroup); }
167
168 /*!
169 * \ingroup Parameter
170 * \brief Get a list of sub groups from the parameter tree sorted by relevance
171 * \return A vector of fully qualified subGroup names sorted by descending relevance.
172 */
173 403 inline std::vector<std::string> getParamSubGroups(const std::string& subGroupName, const std::string& paramGroup)
174
2/6
✓ Branch 3 taken 403 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 403 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
403 { return Parameters::getTree().getSubGroups(subGroupName, paramGroup); }
175
176 } // end namespace Dumux
177
178 #endif
179