queso-0.55.0
StatisticalInverseProblemOptions.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <queso/BoostInputOptionsParser.h>
26 #include <queso/Environment.h>
27 
28 #ifndef UQ_SIP_OPTIONS_H
29 #define UQ_SIP_OPTIONS_H
30 
31 #undef UQ_SIP_READS_SOLVER_OPTION
32 
33 #define UQ_SIP_HELP ""
34 #define UQ_SIP_FILENAME_FOR_NO_FILE "."
35 
36 // _ODV = option default value
37 #define UQ_SIP_COMPUTE_SOLUTION_ODV 1
38 #define UQ_SIP_DATA_OUTPUT_FILE_NAME_ODV UQ_SIP_FILENAME_FOR_NO_FILE
39 #define UQ_SIP_DATA_OUTPUT_ALLOWED_SET_ODV ""
40 #ifdef UQ_SIP_READS_SOLVER_OPTION
41 #define UQ_SIP_SOLVER_ODV "bayes_mc" // Bayesian formula + Metropolis-Hastings
42 #endif
43 
44 #define UQ_SIP_SEEDWITHMAPESTIMATOR 0
45 #define UQ_SIP_USEOPTIMIZERMONITOR 1
46 
47 namespace boost {
48  namespace program_options {
49  class options_description;
50  }
51 }
52 
53 namespace QUESO {
54 
70 {
71 public:
73 
74 
77  SipOptionsValues(const BaseEnvironment * env, const char * prefix);
78 
80 
82 
84  virtual ~SipOptionsValues ();
86 
88 
92 
93  std::string m_prefix;
94 
96  std::string m_help;
97 
99  std::string m_dataOutputFileName;
100  std::set<unsigned int> m_dataOutputAllowedSet;
101 #ifdef UQ_SIP_READS_SOLVER_OPTION
102  std::string m_solverString;
103 #endif
104 
107 
108 private:
110 
111  // The input options as strings so we can parse the input file later
112  std::string m_option_help;
116 #ifdef UQ_SIP_READS_SOLVER_OPTION
117  std::string m_option_solver;
118 #endif
121 
123  void copy(const SipOptionsValues& src);
124 
125  void checkOptions();
126 
127  friend std::ostream & operator<<(std::ostream & os,
128  const SipOptionsValues & obj);
129 };
130 
142 {
143 public:
145 
146  StatisticalInverseProblemOptions(const BaseEnvironment& env, const char* prefix);
148 
150 
152  StatisticalInverseProblemOptions(const BaseEnvironment& env, const char* prefix, const SipOptionsValues& alternativeOptionsValues);
153 
157 
159 
160  void scanOptionsValues();
162 
164  void print (std::ostream& os) const;
166 
168  std::string m_prefix;
169 
170 private:
172  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
174  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
175 
177 
178  boost::program_options::options_description* m_optionsDesc;
179  std::string m_option_help;
183 #ifdef UQ_SIP_READS_SOLVER_OPTION
184  std::string m_option_solver;
185 #endif
188 };
189 
191 std::ostream& operator<<(std::ostream& os, const StatisticalInverseProblemOptions& obj);
192 
193 } // End namespace QUESO
194 
195 #endif // UQ_SIP_OPTIONS_H
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the SIP.
friend std::ostream & operator<<(std::ostream &os, const SipOptionsValues &obj)
void print(std::ostream &os) const
It prints the option values.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Define my SIP options as the default options.
void copy(const SipOptionsValues &src)
Copies the option values from src to this.
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
SipOptionsValues & operator=(const SipOptionsValues &rhs)
Assignment operator; it copies rhs to this.
std::string m_help
If this string is non-empty, options are print to the output file.
This class provides options for a Statistical Inverse Problem if no input file is available...
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
void scanOptionsValues()
It scans the option values from the options input file.
This class reads option values for a Statistical Inverse Problem from an input file.
std::set< unsigned int > m_dataOutputAllowedSet
boost::program_options::options_description * m_optionsDesc
StatisticalInverseProblemOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.

Generated on Fri Jun 17 2016 14:17:41 for queso-0.55.0 by  doxygen 1.8.5