queso-0.53.0
StatisticalForwardProblemOptions.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_SFP_OPTIONS_H
29 #define UQ_SFP_OPTIONS_H
30 
31 #undef UQ_SFP_READS_SOLVER_OPTION
32 
33 #define UQ_SFP_FILENAME_FOR_NO_FILE "."
34 
35 // _ODV = option default value
36 #define UQ_SFP_HELP ""
37 #define UQ_SFP_COMPUTE_SOLUTION_ODV 1
38 #define UQ_SFP_COMPUTE_COVARIANCES_ODV 1
39 #define UQ_SFP_COMPUTE_CORRELATIONS_ODV 1
40 #define UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV UQ_SFP_FILENAME_FOR_NO_FILE
41 #define UQ_SFP_DATA_OUTPUT_ALLOWED_SET_ODV ""
42 #ifdef UQ_SFP_READS_SOLVER_OPTION
43 #define UQ_SFP_SOLVER_ODV "mc" // Monte Carlo
44 #endif
45 
46 namespace boost {
47  namespace program_options {
48  class options_description;
49  }
50 }
51 
52 namespace QUESO {
53 
65 {
66 public:
68 
69 
72  SfpOptionsValues(const BaseEnvironment * env, const char * prefix);
73 
75 
77 
79  virtual ~SfpOptionsValues ();
81 
83 
87 
88  std::string m_prefix;
89 
91  std::string m_help;
92 
96  std::string m_dataOutputFileName;
97  std::set<unsigned int> m_dataOutputAllowedSet;
98 #ifdef UQ_SFP_READS_SOLVER_OPTION
99  std::string m_solverString;
100 #endif
101 
102  //McOptionsValues m_mcOptionsValues;
103 
104 private:
106 
107  // The input options as strings so we can parse the input file later
108  std::string m_option_help;
114 #ifdef UQ_SFP_READS_SOLVER_OPTION
115  std::string m_option_solver;
116 #endif
117 
119  void copy(const SfpOptionsValues& src);
120 
121  void checkOptions();
122 
123  friend std::ostream & operator<<(std::ostream & os,
124  const SfpOptionsValues & obj);
125 };
126 
139 {
140 public:
142 
143  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix);
145 
147 
149  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix, const SfpOptionsValues& alternativeOptionsValues);
150 
154 
156 
157  void scanOptionsValues();
159 
161  void print (std::ostream& os) const;
163 
165  std::string m_prefix;
166 
167 private:
169  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
170 
172  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
173 
175 
176  boost::program_options::options_description* m_optionsDesc;
177  std::string m_option_help;
183 #ifdef UQ_SFP_READS_SOLVER_OPTION
184  std::string m_option_solver;
185 #endif
186 };
188 std::ostream& operator<<(std::ostream& os, const StatisticalForwardProblemOptions& obj);
189 
190 } // End namespace QUESO
191 
192 #endif // UQ_SFP_OPTIONS_H
StatisticalForwardProblemOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
void copy(const SfpOptionsValues &src)
Copies the option values from src to this.
friend std::ostream & operator<<(std::ostream &os, const SfpOptionsValues &obj)
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::set< unsigned int > m_dataOutputAllowedSet
This class reads option values for a Statistical Forward Problem from an input file.
This class provides options for a Statistical Forward Problem if no input file is available...
boost::program_options::options_description * m_optionsDesc
void print(std::ostream &os) const
It prints the option values.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
SfpOptionsValues & operator=(const SfpOptionsValues &rhs)
Assignment operator; it copies rhs to this.
SfpOptionsValues()
Constructor/Destructor methods.
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the SFP.
std::string m_help
If non-empty string, options and values are printed to the output file.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Define my SFP options as the default options.
void scanOptionsValues()
It scans the option values from the options input file.

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5