25 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
26 #include <boost/program_options.hpp>
27 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
29 #include <queso/SimulationModelOptions.h>
30 #include <queso/Miscellaneous.h>
51 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
54 m_option_help(m_prefix +
"help"),
55 m_option_dataOutputFileName(m_prefix +
"dataOutputFileName"),
56 m_option_dataOutputAllowAll(m_prefix +
"dataOutputAllowAll"),
57 m_option_dataOutputAllowedSet(m_prefix +
"dataOutputAllowedSet"),
58 m_option_p_eta(m_prefix +
"p_eta"),
59 m_option_zeroRelativeSingularValue(m_prefix +
"zeroRelativeSingularValue"),
60 m_option_cdfThresholdForPEta(m_prefix +
"cdfThresholdForPEta"),
61 m_option_a_w(m_prefix +
"a_w"),
62 m_option_b_w(m_prefix +
"b_w"),
63 m_option_a_rho_w(m_prefix +
"a_rho_w"),
64 m_option_b_rho_w(m_prefix +
"b_rho_w"),
65 m_option_a_eta(m_prefix +
"a_eta"),
66 m_option_b_eta(m_prefix +
"b_eta"),
67 m_option_a_s(m_prefix +
"a_s"),
68 m_option_b_s(m_prefix +
"b_s")
75 m_prefix((std::string)(prefix) +
"sm_"),
90 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
93 m_option_help(m_prefix +
"help"),
94 m_option_dataOutputFileName(m_prefix +
"dataOutputFileName"),
95 m_option_dataOutputAllowAll(m_prefix +
"dataOutputAllowAll"),
96 m_option_dataOutputAllowedSet(m_prefix +
"dataOutputAllowedSet"),
97 m_option_p_eta(m_prefix +
"p_eta"),
98 m_option_zeroRelativeSingularValue(m_prefix +
"zeroRelativeSingularValue"),
99 m_option_cdfThresholdForPEta(m_prefix +
"cdfThresholdForPEta"),
100 m_option_a_w(m_prefix +
"a_w"),
101 m_option_b_w(m_prefix +
"b_w"),
102 m_option_a_rho_w(m_prefix +
"a_rho_w"),
103 m_option_b_rho_w(m_prefix +
"b_rho_w"),
104 m_option_a_eta(m_prefix +
"a_eta"),
105 m_option_b_eta(m_prefix +
"b_eta"),
106 m_option_a_s(m_prefix +
"a_s"),
107 m_option_b_s(m_prefix +
"b_s")
109 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
148 for (
unsigned int i = 0; i < size; i++) {
166 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
312 m_prefix ((std::string)(prefix) +
"sm_"),
314 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
315 m_optionsDesc (new boost::program_options::options_description(
"Simulation model options")),
317 m_option_help (m_prefix +
"help" ),
318 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
319 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
320 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
321 m_option_p_eta (m_prefix +
"p_eta" ),
322 m_option_zeroRelativeSingularValue(m_prefix +
"zeroRelativeSingularValue"),
323 m_option_cdfThresholdForPEta (m_prefix +
"cdfThresholdForPEta" ),
324 m_option_a_w (m_prefix +
"a_w" ),
325 m_option_b_w (m_prefix +
"b_w" ),
326 m_option_a_rho_w (m_prefix +
"a_rho_w" ),
327 m_option_b_rho_w (m_prefix +
"b_rho_w" ),
328 m_option_a_eta (m_prefix +
"a_eta" ),
329 m_option_b_eta (m_prefix +
"b_eta" ),
330 m_option_a_s (m_prefix +
"a_s" ),
331 m_option_b_s (m_prefix +
"b_s" )
341 m_ov (alternativeOptionsValues),
342 m_prefix ((std::string)(prefix) +
"sm_"),
344 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
345 m_optionsDesc (NULL),
347 m_option_help (m_prefix +
"help" ),
348 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
349 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
350 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
351 m_option_p_eta (m_prefix +
"p_eta" ),
352 m_option_zeroRelativeSingularValue(m_prefix +
"zeroRelativeSingularValue"),
353 m_option_cdfThresholdForPEta (m_prefix +
"cdfThresholdForPEta" ),
354 m_option_a_w (m_prefix +
"a_w" ),
355 m_option_b_w (m_prefix +
"b_w" ),
356 m_option_a_rho_w (m_prefix +
"a_rho_w" ),
357 m_option_b_rho_w (m_prefix +
"b_rho_w" ),
358 m_option_a_eta (m_prefix +
"a_eta" ),
359 m_option_b_eta (m_prefix +
"b_eta" ),
360 m_option_a_s (m_prefix +
"a_s" ),
361 m_option_b_s (m_prefix +
"b_s" )
369 <<
": after setting values of options with prefix '" <<
m_prefix
370 <<
"', state of object is:"
380 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
382 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
390 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
400 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
404 <<
": after reading values of options with prefix '" <<
m_prefix
405 <<
"', state of object is:"
413 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
419 optionsDesc.add_options()
420 (
m_option_help.c_str(),
"produce help message for simulation model options")
439 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
441 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
465 std::vector<double> tmpAllow(0,0.);
469 if (tmpAllow.size() > 0) {
470 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
522 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
SmOptionsValues & operator=(const SmOptionsValues &rhs)
#define UQ_SIMULATION_MODEL_B_W_ODV
double m_cdfThresholdForPEta
const GetPot & input() const
The GetPot input file parser.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
~SimulationModelOptions()
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::set< unsigned int > m_dataOutputAllowedSet
#define UQ_SIMULATION_MODEL_A_W_ODV
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
#define UQ_SIMULATION_MODEL_A_ETA_ODV
std::string m_option_help
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
std::string m_option_b_eta
#define UQ_SIMULATION_MODEL_B_RHO_W_ODV
void print(std::ostream &os) const
double m_zeroRelativeSingularValue
const BaseEnvironment & m_env
std::string m_option_a_eta
boost::program_options::options_description * m_optionsDesc
BoostInputOptionsParser * m_parser
std::string m_dataOutputFileName
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 UQ_SIMULATION_MODEL_DATA_OUTPUT_FILE_NAME_ODV
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
#define queso_require_equal_to_msg(expr1, expr2, msg)
bool m_dataOutputAllowAll
boost::program_options::variables_map & allOptionsMap() const
std::string m_option_b_eta
unsigned int subId() const
Access function to the number of each sub-environment Id: m_subId.
std::string m_option_a_eta
std::string m_option_dataOutputAllowedSet
#define queso_deprecated()
std::string m_option_a_rho_w
std::string m_option_p_eta
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
#define UQ_SIMULATION_MODEL_B_ETA_ODV
void scanInputFile()
This is the method that parses the input file.
#define UQ_SIMULATION_MODEL_B_S_ODV
std::string m_option_dataOutputFileName
void copy(const SmOptionsValues &src)
std::string m_option_dataOutputFileName
std::string m_option_b_rho_w
std::string m_option_zeroRelativeSingularValue
std::string m_option_help
std::string m_option_dataOutputAllowAll
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
std::string m_option_p_eta
#define UQ_SIMULATION_MODEL_A_RHO_W_ODV
std::string m_option_dataOutputAllowAll
std::string m_option_zeroRelativeSingularValue
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)
#define UQ_SIMULATION_MODEL_ZERO_RELATIVE_SINGULAR_VALUE_ODV
#define UQ_SIMULATION_MODEL_CDF_THRESHOLD_FOR_P_ETA_ODV
#define UQ_SIMULATION_MODEL_A_S_ODV
std::string m_option_dataOutputAllowedSet
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
virtual ~SmOptionsValues()
std::string m_option_a_rho_w
#define UQ_SIMULATION_MODEL_DATA_OUTPUT_ALLOWED_SET_ODV
#define UQ_SIMULATION_MODEL_P_ETA_ODV
SimulationModelOptions(const BaseEnvironment &env, const char *prefix)
std::string m_option_b_rho_w
#define UQ_SIMULATION_MODEL_DATA_OUTPUT_ALLOW_ALL_ODV
std::string m_option_cdfThresholdForPEta
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
std::string m_option_cdfThresholdForPEta