queso-0.56.1
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 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
26 #include <queso/BoostInputOptionsParser.h>
27 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
28 
29 #include <queso/Environment.h>
30 
31 #ifndef UQ_SFP_OPTIONS_H
32 #define UQ_SFP_OPTIONS_H
33 
34 #undef UQ_SFP_READS_SOLVER_OPTION
35 
36 #define UQ_SFP_FILENAME_FOR_NO_FILE "."
37 
38 // _ODV = option default value
39 #define UQ_SFP_HELP ""
40 #define UQ_SFP_COMPUTE_SOLUTION_ODV 1
41 #define UQ_SFP_COMPUTE_COVARIANCES_ODV 1
42 #define UQ_SFP_COMPUTE_CORRELATIONS_ODV 1
43 #define UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV UQ_SFP_FILENAME_FOR_NO_FILE
44 #define UQ_SFP_DATA_OUTPUT_ALLOWED_SET_ODV ""
45 #ifdef UQ_SFP_READS_SOLVER_OPTION
46 #define UQ_SFP_SOLVER_ODV "mc" // Monte Carlo
47 #endif
48 
49 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
50 namespace boost {
51  namespace program_options {
52  class options_description;
53  }
54 }
55 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
56 
57 namespace QUESO {
58 
70 {
71 public:
73 
74 
77  SfpOptionsValues(const BaseEnvironment * env, const char * prefix);
78 
80 
82 
84  virtual ~SfpOptionsValues ();
86 
88 
92 
93  std::string m_prefix;
94 
96  std::string m_help;
97 
101  std::string m_dataOutputFileName;
102  std::set<unsigned int> m_dataOutputAllowedSet;
103 #ifdef UQ_SFP_READS_SOLVER_OPTION
104  std::string m_solverString;
105 #endif
106 
107  //McOptionsValues m_mcOptionsValues;
108 
109 private:
110 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
112 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
113 
114  // The input options as strings so we can parse the input file later
115  std::string m_option_help;
121 #ifdef UQ_SFP_READS_SOLVER_OPTION
122  std::string m_option_solver;
123 #endif
124 
126  void copy(const SfpOptionsValues& src);
127 
128  void checkOptions();
129 
130  friend std::ostream & operator<<(std::ostream & os,
131  const SfpOptionsValues & obj);
132 };
133 
146 {
147 public:
149 
150  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix);
152 
154 
156  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix, const SfpOptionsValues& alternativeOptionsValues);
157 
161 
163 
164  void scanOptionsValues();
166 
168  void print (std::ostream& os) const;
170 
172  std::string m_prefix;
173 
174 private:
175 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
176  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
178 
180  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
181 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
182 
184 
185 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
186  boost::program_options::options_description* m_optionsDesc;
187 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
188  std::string m_option_help;
194 #ifdef UQ_SFP_READS_SOLVER_OPTION
195  std::string m_option_solver;
196 #endif
197 };
199 std::ostream& operator<<(std::ostream& os, const StatisticalForwardProblemOptions& obj);
200 
201 } // End namespace QUESO
202 
203 #endif // UQ_SFP_OPTIONS_H
SfpOptionsValues()
Constructor/Destructor methods.
StatisticalForwardProblemOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
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.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
void scanOptionsValues()
It scans the option values from the options input file.
void print(std::ostream &os) const
It prints the option values.
This class provides options for a Statistical Forward Problem if no input file is available...
void copy(const SfpOptionsValues &src)
Copies the option values from src to this.
std::set< unsigned int > m_dataOutputAllowedSet
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the SFP.
friend std::ostream & operator<<(std::ostream &os, const SfpOptionsValues &obj)
SfpOptionsValues & operator=(const SfpOptionsValues &rhs)
Assignment operator; it copies rhs to this.
boost::program_options::options_description * m_optionsDesc
This class reads option values for a Statistical Forward Problem from an input file.

Generated on Thu Dec 15 2016 13:23:11 for queso-0.56.1 by  doxygen 1.8.5