queso-0.56.0
SimulationModelOptions.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 UQ_SIMULATION_MODEL_OPTIONS_H
26 #define UQ_SIMULATION_MODEL_OPTIONS_H
27 
28 #include <queso/Environment.h>
29 
30 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
31 #include <queso/BoostInputOptionsParser.h>
32 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
33 
34 #define UQ_SIMULATION_MODEL_FILENAME_FOR_NO_FILE "."
35 
36 // _ODV = option default value
37 #define UQ_SIMULATION_MODEL_DATA_OUTPUT_FILE_NAME_ODV UQ_SIMULATION_MODEL_FILENAME_FOR_NO_FILE
38 #define UQ_SIMULATION_MODEL_DATA_OUTPUT_ALLOW_ALL_ODV 0
39 #define UQ_SIMULATION_MODEL_DATA_OUTPUT_ALLOWED_SET_ODV ""
40 #define UQ_SIMULATION_MODEL_P_ETA_ODV 1
41 #define UQ_SIMULATION_MODEL_ZERO_RELATIVE_SINGULAR_VALUE_ODV 0.
42 #define UQ_SIMULATION_MODEL_CDF_THRESHOLD_FOR_P_ETA_ODV 1.
43 #define UQ_SIMULATION_MODEL_A_W_ODV 0.
44 #define UQ_SIMULATION_MODEL_B_W_ODV 0.
45 #define UQ_SIMULATION_MODEL_A_RHO_W_ODV 0.
46 #define UQ_SIMULATION_MODEL_B_RHO_W_ODV 0.
47 #define UQ_SIMULATION_MODEL_A_ETA_ODV 0.
48 #define UQ_SIMULATION_MODEL_B_ETA_ODV 0.
49 #define UQ_SIMULATION_MODEL_A_S_ODV 0.
50 #define UQ_SIMULATION_MODEL_B_S_ODV 0.
51 
52 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
53 namespace boost {
54  namespace program_options {
55  class options_description;
56  }
57 }
58 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
59 
60 namespace QUESO {
61 
63 {
64 public:
66  SmOptionsValues(const BaseEnvironment * env, const char * prefix);
67  SmOptionsValues(const SmOptionsValues& src);
69  virtual ~SmOptionsValues();
70 
71  std::string m_prefix;
72 
73  std::string m_dataOutputFileName;
75  std::set<unsigned int> m_dataOutputAllowedSet;
76  unsigned int m_p_eta;
79  double m_a_w;
80  double m_b_w;
81  double m_a_rho_w;
82  double m_b_rho_w;
83  double m_a_eta;
84  double m_b_eta;
85  double m_a_s;
86  double m_b_s;
87 
88 private:
89 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
91 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
92 
93  std::string m_option_help;
97  std::string m_option_p_eta;
100  std::string m_option_a_w;
101  std::string m_option_b_w;
102  std::string m_option_a_rho_w;
103  std::string m_option_b_rho_w;
104  std::string m_option_a_eta;
105  std::string m_option_b_eta;
106  std::string m_option_a_s;
107  std::string m_option_b_s;
108 
109  void copy(const SmOptionsValues& src);
110 };
111 
113 
115 {
116 public:
117  SimulationModelOptions(const BaseEnvironment& env, const char* prefix);
118  SimulationModelOptions(const BaseEnvironment& env, const char* prefix, const SmOptionsValues& alternativeOptionsValues);
120 
121  void scanOptionsValues();
122  void print (std::ostream& os) const;
123 
125  std::string m_prefix;
126 
127 private:
128 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
129  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
130  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
131 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
132 
134 
135 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
136  boost::program_options::options_description* m_optionsDesc;
137 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
138  std::string m_option_help;
142  std::string m_option_p_eta;
145  std::string m_option_a_w;
146  std::string m_option_b_w;
147  std::string m_option_a_rho_w;
148  std::string m_option_b_rho_w;
149  std::string m_option_a_eta;
150  std::string m_option_b_eta;
151  std::string m_option_a_s;
152  std::string m_option_b_s;
153 };
154 
155 std::ostream& operator<<(std::ostream& os, const SimulationModelOptions& obj);
156 
157 } // End namespace QUESO
158 
159 #endif // UQ_SIMULATION_MODEL_OPTIONS_H
SmOptionsValues & operator=(const SmOptionsValues &rhs)
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::set< unsigned int > m_dataOutputAllowedSet
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
void print(std::ostream &os) const
boost::program_options::options_description * m_optionsDesc
BoostInputOptionsParser * m_parser
void copy(const SmOptionsValues &src)
std::string m_option_zeroRelativeSingularValue
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
SimulationModelOptions(const BaseEnvironment &env, const char *prefix)
void defineMyOptions(boost::program_options::options_description &optionsDesc) const

Generated on Tue Nov 29 2016 10:53:10 for queso-0.56.0 by  doxygen 1.8.5