queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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-2017 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/config_queso.h>
26 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
27 #include <queso/BoostInputOptionsParser.h>
28 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
29 
30 #include <queso/Environment.h>
31 
32 #ifndef UQ_SFP_OPTIONS_H
33 #define UQ_SFP_OPTIONS_H
34 
35 #undef UQ_SFP_READS_SOLVER_OPTION
36 
37 #define UQ_SFP_FILENAME_FOR_NO_FILE "."
38 
39 // _ODV = option default value
40 #define UQ_SFP_HELP ""
41 #define UQ_SFP_COMPUTE_SOLUTION_ODV 1
42 #define UQ_SFP_COMPUTE_COVARIANCES_ODV 1
43 #define UQ_SFP_COMPUTE_CORRELATIONS_ODV 1
44 #define UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV UQ_SFP_FILENAME_FOR_NO_FILE
45 #define UQ_SFP_DATA_OUTPUT_ALLOWED_SET_ODV ""
46 #ifdef UQ_SFP_READS_SOLVER_OPTION
47 #define UQ_SFP_SOLVER_ODV "mc" // Monte Carlo
48 #endif
49 
50 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
51 namespace boost {
52  namespace program_options {
53  class options_description;
54  }
55 }
56 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
57 
58 namespace QUESO {
59 
71 {
72 public:
74 
75 
78  SfpOptionsValues(const BaseEnvironment * env, const char * prefix);
79 
81 
83 
85  virtual ~SfpOptionsValues ();
87 
89 
93 
94  std::string m_prefix;
95 
97  std::string m_help;
98 
102  std::string m_dataOutputFileName;
103  std::set<unsigned int> m_dataOutputAllowedSet;
104 #ifdef UQ_SFP_READS_SOLVER_OPTION
105  std::string m_solverString;
106 #endif
107 
108  //McOptionsValues m_mcOptionsValues;
109 
110 private:
111 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
113 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
114 
115  // The input options as strings so we can parse the input file later
116  std::string m_option_help;
122 #ifdef UQ_SFP_READS_SOLVER_OPTION
123  std::string m_option_solver;
124 #endif
125 
127  void copy(const SfpOptionsValues& src);
128 
129  void checkOptions();
130 
131  friend std::ostream & operator<<(std::ostream & os,
132  const SfpOptionsValues & obj);
133 };
134 
147 {
148 public:
150 
151  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix);
153 
155 
157  StatisticalForwardProblemOptions(const BaseEnvironment& env, const char* prefix, const SfpOptionsValues& alternativeOptionsValues);
158 
162 
164 
165  void scanOptionsValues();
167 
169  void print (std::ostream& os) const;
171 
173  std::string m_prefix;
174 
175 private:
176 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
177  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
179 
181  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
182 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
183 
185 
186 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
187  boost::program_options::options_description* m_optionsDesc;
188 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
189  std::string m_option_help;
195 #ifdef UQ_SFP_READS_SOLVER_OPTION
196  std::string m_option_solver;
197 #endif
198 };
200 std::ostream& operator<<(std::ostream& os, const StatisticalForwardProblemOptions& obj);
201 
202 } // End namespace QUESO
203 
204 #endif // UQ_SFP_OPTIONS_H
SfpOptionsValues()
Constructor/Destructor methods.
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...
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
std::string m_help
If non-empty string, options and values are printed to the output file.
boost::program_options::options_description * m_optionsDesc
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
void scanOptionsValues()
It scans the option values from the options input file.
void copy(const SfpOptionsValues &src)
Copies the option values from src to this.
std::set< unsigned int > m_dataOutputAllowedSet
void print(std::ostream &os) const
It prints the option values.
StatisticalForwardProblemOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Define my SFP options as the default options.
SfpOptionsValues & operator=(const SfpOptionsValues &rhs)
Assignment operator; it copies rhs to this.
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)

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5