queso-0.50.1
MLSamplingOptions.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,2009,2010,2011,2012,2013 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_MULTI_LEVEL_SAMPLING_OPTIONS_H
26 #define UQ_MULTI_LEVEL_SAMPLING_OPTIONS_H
27 
28 #include <queso/Environment.h>
29 #include <queso/MLSamplingLevelOptions.h>
30 
31 #define UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE "."
32 
33 // _ODV = option default value
34 
35 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
36 
37 #define UQ_ML_SAMPLING_RESTART_OUTPUT_LEVEL_PERIOD_ODV 0
38 #define UQ_ML_SAMPLING_RESTART_OUTPUT_BASE_NAME_FOR_FILES_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
39 #define UQ_ML_SAMPLING_RESTART_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
40 #define UQ_ML_SAMPLING_RESTART_INPUT_BASE_NAME_FOR_FILES_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
41 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
42 
43 #else
44 
45 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_NAME_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
46 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_TYPE_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
47 #define UQ_ML_SAMPLING_RESTART_CHAIN_SIZE_ODV 100
48 
49 #endif
50 
51 #define UQ_ML_SAMPLING_DATA_OUTPUT_FILE_NAME_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
52 #define UQ_ML_SAMPLING_DATA_OUTPUT_ALLOW_ALL_ODV 0
53 #define UQ_ML_SAMPLING_DATA_OUTPUT_ALLOWED_SET_ODV ""
54 
55 namespace QUESO {
56 
68 {
69 public:
71 
72 
74  MLSamplingOptions(const BaseEnvironment& env, const char* prefix);
75 
79 
81 
82  void scanOptionsValues();
84 
86  void print (std::ostream& os) const;
88 
90  std::string m_prefix;
91 
92 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
93  unsigned int m_restartOutput_levelPeriod;
95 
97  std::string m_restartOutput_baseNameForFiles;
98 
100  std::string m_restartOutput_fileType;
101 
103  std::string m_restartInput_baseNameForFiles;
104 
106  std::string m_restartInput_fileType;
107 #else
108  std::string m_restartInputFileName;
110 
113 
115  unsigned int m_restartChainSize;
116 #endif
117  std::string m_dataOutputFileName;
119 
122  std::set<unsigned int> m_dataOutputAllowedSet;
123 
124 private:
126  void defineMyOptions (po::options_description& optionsDesc) const;
127 
129  void getMyOptionValues(po::options_description& optionsDesc);
130 
132  po::options_description* m_optionsDesc;
133 
134  std::string m_option_help;
135 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
136  std::string m_option_restartOutput_levelPeriod;
137  std::string m_option_restartOutput_baseNameForFiles;
138  std::string m_option_restartOutput_fileType;
139  std::string m_option_restartInput_baseNameForFiles;
140  std::string m_option_restartInput_fileType;
141 #else
145 #endif
149 };
150 
151 std::ostream& operator<<(std::ostream& os, const MLSamplingOptions& obj);
152 
153 } // End namespace QUESO
154 
155 #endif // UQ_MULTI_LEVEL_SAMPLING_OPTIONS_H
void defineMyOptions(po::options_description &optionsDesc) const
Defines the options for the Multilevel generator of samples as the default options.
std::string m_option_restartInputFileType
po::options_description * m_optionsDesc
void print(std::ostream &os) const
It prints the option values.
std::string m_prefix
Class prefix. (ml)
void scanOptionsValues()
It scans the option values from the options input file.
bool m_dataOutputAllowAll
subEnvs that will write to generic output file
void getMyOptionValues(po::options_description &optionsDesc)
Gets the sequence options defined to the Multilevel algorithm.
const BaseEnvironment & m_env
MLSamplingOptions(const BaseEnvironment &env, const char *prefix)
Default constructor.
std::string m_option_dataOutputAllowAll
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:187
std::set< unsigned int > m_dataOutputAllowedSet
This class provides options for the Multilevel sequence generator if no input file is available...
unsigned int m_restartChainSize
Size of restart chain.
std::string m_restartInputFileType
Type of restart input file.
std::string m_option_dataOutputFileName
~MLSamplingOptions()
Destructor.
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::string m_restartInputFileName
Name of restart input file.
std::string m_option_dataOutputAllowedSet
std::string m_dataOutputFileName
Name of generic output file.
std::string m_option_restartInputFileName

Generated on Thu Apr 23 2015 19:18:34 for queso-0.50.1 by  doxygen 1.8.5