queso-0.56.0
ExperimentModelOptions.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_EXPERIMENT_MODEL_OPTIONS_H
26 #define UQ_EXPERIMENT_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 // _ODV = option default value
35 #define UQ_EXPERIMENT_MODEL_G_VALUES_ODV ""
36 #define UQ_EXPERIMENT_MODEL_A_V_ODV 0.
37 #define UQ_EXPERIMENT_MODEL_B_V_ODV 0.
38 #define UQ_EXPERIMENT_MODEL_A_RHO_V_ODV 0.
39 #define UQ_EXPERIMENT_MODEL_B_RHO_V_ODV 0.
40 #define UQ_EXPERIMENT_MODEL_A_Y_ODV 0.
41 #define UQ_EXPERIMENT_MODEL_B_Y_ODV 0.
42 
43 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
44 namespace boost {
45  namespace program_options {
46  class options_description;
47  }
48 }
49 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
50 
51 namespace QUESO {
52 
54 {
55 public:
57  EmOptionsValues(const BaseEnvironment * env, const char * prefix);
58  EmOptionsValues(const EmOptionsValues& src);
60  virtual ~EmOptionsValues();
61 
62  std::string m_prefix;
63 
64  std::vector<unsigned int> m_Gvalues;
65  double m_a_v;
66  double m_b_v;
67  double m_a_rho_v;
68  double m_b_rho_v;
69  double m_a_y;
70  double m_b_y;
71 
72 private:
73 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
75 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
76 
77  std::string m_option_help;
78  std::string m_option_Gvalues;
79  std::string m_option_a_v;
80  std::string m_option_b_v;
81  std::string m_option_a_rho_v;
82  std::string m_option_b_rho_v;
83  std::string m_option_a_y;
84  std::string m_option_b_y;
85 
86  void copy(const EmOptionsValues& src);
87 };
88 
90 {
91 public:
92  ExperimentModelOptions(const BaseEnvironment& env, const char* prefix);
93  ExperimentModelOptions(const BaseEnvironment& env, const char* prefix, const EmOptionsValues& alternativeOptionsValues);
95 
96  void scanOptionsValues();
97  void print (std::ostream& os) const;
98 
100  std::string m_prefix;
101 
102 private:
103 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
104  void defineMyOptions (boost::program_options::options_description& optionsDesc) const;
105  void getMyOptionValues(boost::program_options::options_description& optionsDesc);
106 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
107 
109 
110 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
111  boost::program_options::options_description* m_optionsDesc;
112 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
113  std::string m_option_help;
114  std::string m_option_Gvalues;
115  std::string m_option_a_v;
116  std::string m_option_b_v;
117  std::string m_option_a_rho_v;
118  std::string m_option_b_rho_v;
119  std::string m_option_a_y;
120  std::string m_option_b_y;
121 };
122 
123 std::ostream& operator<<(std::ostream& os, const ExperimentModelOptions& obj);
124 
125 } // End namespace QUESO
126 
127 #endif // UQ_EXPERIMENT_MODEL_OPTIONS_H
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
void copy(const EmOptionsValues &src)
EmOptionsValues & operator=(const EmOptionsValues &rhs)
void print(std::ostream &os) const
std::vector< unsigned int > m_Gvalues
BoostInputOptionsParser * m_parser
ExperimentModelOptions(const BaseEnvironment &env, const char *prefix)
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
boost::program_options::options_description * m_optionsDesc

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