25 #include <queso/StatisticalInverseProblemOptions.h>
26 #include <queso/Miscellaneous.h>
40 #ifdef UQ_SIP_READS_SOLVER_OPTION
41 m_solverString (UQ_SIP_SOLVER_ODV),
69 #ifdef UQ_SIP_READS_SOLVER_OPTION
70 m_solverString = src.m_solverString;
87 m_prefix ((std::string)(prefix) +
"ip_"),
89 m_optionsDesc (new po::options_description(
"Statistical Inverse Problem options")),
90 m_option_help (m_prefix +
"help" ),
91 m_option_computeSolution (m_prefix +
"computeSolution" ),
92 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
93 m_option_dataOutputAllowedSet(m_prefix +
"dataOutputAllowedSet")
94 #ifdef UQ_SIP_READS_SOLVER_OPTION
95 m_option_solver (m_prefix +
"solver" )
100 "StatisticalInverseProblemOptions::constructor(1)",
101 "this constructor is incompatible with the absence of an options input file");
110 m_ov (alternativeOptionsValues),
111 m_prefix ((std::string)(prefix) +
"ip_"),
113 m_optionsDesc (NULL),
114 m_option_help (m_prefix +
"help" ),
115 m_option_computeSolution (m_prefix +
"computeSolution" ),
116 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
117 m_option_dataOutputAllowedSet(m_prefix +
"dataOutputAllowedSet")
118 #ifdef UQ_SIP_READS_SOLVER_OPTION
119 m_option_solver (m_prefix +
"solver" )
124 "StatisticalInverseProblemOptions::constructor(2)",
125 "this constructor is incompatible with the existence of an options input file");
129 <<
": after setting values of options with prefix '" <<
m_prefix
130 <<
"', state of object is:"
147 "StatisticalInverseProblemOptions::scanOptionsValues()",
148 "m_optionsDesc variable is NULL");
160 <<
": after reading values of options with prefix '" <<
m_prefix
161 <<
"', state of object is:"
178 #ifdef UQ_SIP_READS_SOLVER_OPTION
179 <<
"\n" << m_option_solver <<
" = " <<
m_ov.m_solverString
189 optionsDesc.add_options()
190 (
m_option_help.c_str(),
"produce help message for statistical inverse problem")
194 #ifdef UQ_SIP_READS_SOLVER_OPTION
195 (m_option_solver.c_str(), po::value<std::string>()->default_value(UQ_SIP_SOLVER_ODV ),
"algorithm for calibration" )
222 std::vector<double> tmpAllow(0,0.);
226 if (tmpAllow.size() > 0) {
227 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
233 #ifdef UQ_SIP_READS_SOLVER_OPTION
235 m_ov.m_solverString = ((
const po::variable_value&)
m_env.
allOptionsMap()[m_option_solver]).as<std::string>();
void copy(const SipOptionsValues &src)
Copies the option values from src to this.
void getMyOptionValues(po::options_description &optionsDesc)
Gets the option values of the SIP.
StatisticalInverseProblemOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
This class provides options for a Statistical Inverse Problem if no input file is available...
std::string m_option_help
int worldRank() const
Returns the process world rank.
#define UQ_SIP_DATA_OUTPUT_ALLOWED_SET_ODV
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
void defineMyOptions(po::options_description &optionsDesc) const
Define my SIP options as the default options.
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
po::variables_map & allOptionsMap() const
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
const BaseEnvironment & m_env
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
#define UQ_SIP_COMPUTE_SOLUTION_ODV
SipOptionsValues()
Default constructor.
std::string m_dataOutputFileName
~StatisticalInverseProblemOptions()
Destructor.
std::string m_option_computeSolution
This class reads option values for a Statistical Inverse Problem from an input file.
std::string m_option_dataOutputAllowedSet
SipOptionsValues & operator=(const SipOptionsValues &rhs)
Assignment operator; it copies rhs to this.
~SipOptionsValues()
Destructor.
std::set< unsigned int > m_dataOutputAllowedSet
void print(std::ostream &os) const
It prints the option values.
void scanOptionsValues()
It scans the option values from the options input file.
#define UQ_SIP_DATA_OUTPUT_FILE_NAME_ODV
std::string m_option_dataOutputFileName
po::options_description * m_optionsDesc
void scanInputFileForMyOptions(const po::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.