25 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
26 #include <boost/program_options.hpp>
27 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
29 #include <queso/ExperimentModelOptions.h>
30 #include <queso/Miscellaneous.h>
44 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
47 m_option_help(m_prefix +
"help"),
48 m_option_Gvalues(m_prefix +
"Gvalues"),
49 m_option_a_v(m_prefix +
"a_v"),
50 m_option_b_v(m_prefix +
"b_v"),
51 m_option_a_rho_v(m_prefix +
"a_rho_v"),
52 m_option_b_rho_v(m_prefix +
"b_rho_v"),
53 m_option_a_y(m_prefix +
"a_y"),
54 m_option_b_y(m_prefix +
"b_y")
61 m_prefix((std::string)(prefix) +
"em_"),
69 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
72 m_option_help(m_prefix +
"help"),
73 m_option_Gvalues(m_prefix +
"Gvalues"),
74 m_option_a_v(m_prefix +
"a_v"),
75 m_option_b_v(m_prefix +
"b_v"),
76 m_option_a_rho_v(m_prefix +
"a_rho_v"),
77 m_option_b_rho_v(m_prefix +
"b_rho_v"),
78 m_option_a_y(m_prefix +
"a_y"),
79 m_option_b_y(m_prefix +
"b_y")
81 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
104 for (
unsigned int i = 0; i < size; i++) {
117 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
224 m_prefix ((std::string)(prefix) +
"em_"),
226 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
227 m_optionsDesc (new boost::program_options::options_description(
"Experiment model options")),
229 m_option_help (m_prefix +
"help" ),
230 m_option_Gvalues(m_prefix +
"Gvalues"),
231 m_option_a_v (m_prefix +
"a_v" ),
232 m_option_b_v (m_prefix +
"b_v" ),
233 m_option_a_rho_v(m_prefix +
"a_rho_v"),
234 m_option_b_rho_v(m_prefix +
"b_rho_v"),
235 m_option_a_y (m_prefix +
"a_y" ),
236 m_option_b_y (m_prefix +
"b_y" )
248 m_ov (alternativeOptionsValues),
249 m_prefix ((std::string)(prefix) +
"em_"),
251 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
252 m_optionsDesc (NULL),
254 m_option_help (m_prefix +
"help" ),
255 m_option_Gvalues(m_prefix +
"Gvalues"),
256 m_option_a_v (m_prefix +
"a_v" ),
257 m_option_b_v (m_prefix +
"b_v" ),
258 m_option_a_rho_v(m_prefix +
"a_rho_v"),
259 m_option_b_rho_v(m_prefix +
"b_rho_v"),
260 m_option_a_y (m_prefix +
"a_y" ),
261 m_option_b_y (m_prefix +
"b_y" )
269 <<
": after setting values of options with prefix '" <<
m_prefix
270 <<
"', state of object is:"
280 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
282 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
290 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
296 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
300 <<
": after reading values of options with prefix '" <<
m_prefix
301 <<
"', state of object is:"
309 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
315 optionsDesc.add_options()
316 (
m_option_help.c_str(),
"produce help message for experiment model options")
328 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
330 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
343 std::vector<double> tmpValues(0,0.);
354 unsigned int tmpSize = tmpValues.size();
357 for (
unsigned int i = 0; i < tmpSize; ++i) {
388 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
std::string m_option_help
const GetPot & input() const
The GetPot input file parser.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
std::string m_option_Gvalues
#define UQ_EXPERIMENT_MODEL_A_Y_ODV
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
#define UQ_EXPERIMENT_MODEL_A_RHO_V_ODV
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
void copy(const EmOptionsValues &src)
EmOptionsValues & operator=(const EmOptionsValues &rhs)
std::string m_option_b_rho_v
unsigned vector_variable_size(const char *VarName) const
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
#define queso_require_equal_to_msg(expr1, expr2, msg)
boost::program_options::variables_map & allOptionsMap() const
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
void print(std::ostream &os) const
std::vector< unsigned int > m_Gvalues
#define UQ_EXPERIMENT_MODEL_B_V_ODV
#define queso_deprecated()
const BaseEnvironment & m_env
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
void scanInputFile()
This is the method that parses the input file.
std::string m_option_b_rho_v
virtual ~EmOptionsValues()
#define UQ_EXPERIMENT_MODEL_B_Y_ODV
BoostInputOptionsParser * m_parser
std::string m_option_help
ExperimentModelOptions(const BaseEnvironment &env, const char *prefix)
#define UQ_EXPERIMENT_MODEL_A_V_ODV
std::string m_option_Gvalues
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
~ExperimentModelOptions()
#define UQ_EXPERIMENT_MODEL_B_RHO_V_ODV
void registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
#define queso_require_msg(asserted, msg)
std::string m_option_a_rho_v
#define UQ_EXPERIMENT_MODEL_G_VALUES_ODV
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
std::string m_option_a_rho_v
boost::program_options::options_description * m_optionsDesc