queso-0.56.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-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_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 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
32 #include <queso/BoostInputOptionsParser.h>
33 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
34 
35 #define UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE "."
36 
37 // _ODV = option default value
38 
39 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
40 
41 #define UQ_ML_SAMPLING_HELP ""
42 #define UQ_ML_SAMPLING_RESTART_OUTPUT_LEVEL_PERIOD_ODV 0
43 #define UQ_ML_SAMPLING_RESTART_OUTPUT_BASE_NAME_FOR_FILES_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
44 #define UQ_ML_SAMPLING_RESTART_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
45 #define UQ_ML_SAMPLING_RESTART_INPUT_BASE_NAME_FOR_FILES_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
46 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
47 
48 #else
49 
50 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_NAME_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
51 #define UQ_ML_SAMPLING_RESTART_INPUT_FILE_TYPE_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
52 #define UQ_ML_SAMPLING_RESTART_CHAIN_SIZE_ODV 100
53 
54 #endif
55 
56 #define UQ_ML_SAMPLING_DATA_OUTPUT_FILE_NAME_ODV UQ_ML_SAMPLING_FILENAME_FOR_NO_FILE
57 #define UQ_ML_SAMPLING_DATA_OUTPUT_ALLOW_ALL_ODV 0
58 #define UQ_ML_SAMPLING_DATA_OUTPUT_ALLOWED_SET_ODV ""
59 
60 namespace QUESO {
61 
73 {
74 public:
76 
77 
79  MLSamplingOptions(const BaseEnvironment& env, const char* prefix);
80 
82  virtual ~MLSamplingOptions();
84 
86 
87  void print (std::ostream& os) const;
90 
92  std::string m_prefix;
93 
95  std::string m_help;
96 
97 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
98  unsigned int m_restartOutput_levelPeriod;
100 
102  std::string m_restartOutput_baseNameForFiles;
103 
105  std::string m_restartOutput_fileType;
106 
108  std::string m_restartInput_baseNameForFiles;
109 
111  std::string m_restartInput_fileType;
112 #else
113  std::string m_restartInputFileName;
115 
118 
120  unsigned int m_restartChainSize;
121 #endif
122  std::string m_dataOutputFileName;
124 
127  std::set<unsigned int> m_dataOutputAllowedSet;
128 
129 private:
131 
132 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
134 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
135 
136  std::string m_option_help;
137 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
138  std::string m_option_restartOutput_levelPeriod;
139  std::string m_option_restartOutput_baseNameForFiles;
140  std::string m_option_restartOutput_fileType;
141  std::string m_option_restartInput_baseNameForFiles;
142  std::string m_option_restartInput_fileType;
143 #else
147 #endif
151 
152  void checkOptions(const BaseEnvironment * env);
153 
154  friend std::ostream & operator<<(std::ostream & os,
155  const MLSamplingOptions & obj);
156 };
157 
158 
159 } // End namespace QUESO
160 
161 #endif // UQ_MULTI_LEVEL_SAMPLING_OPTIONS_H
BoostInputOptionsParser * m_parser
bool m_dataOutputAllowAll
subEnvs that will write to generic output file
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
std::string m_restartInputFileName
Name of restart input file.
MLSamplingOptions(const BaseEnvironment &env, const char *prefix)
Default constructor.
void checkOptions(const BaseEnvironment *env)
virtual ~MLSamplingOptions()
Destructor.
std::string m_dataOutputFileName
Name of generic output file.
This class provides options for the Multilevel sequence generator if no input file is available...
const BaseEnvironment & m_env
unsigned int m_restartChainSize
Size of restart chain.
std::string m_option_dataOutputAllowAll
std::string m_restartInputFileType
Type of restart input file.
std::string m_option_dataOutputFileName
std::string m_option_restartInputFileType
std::set< unsigned int > m_dataOutputAllowedSet
std::string m_option_restartInputFileName
friend std::ostream & operator<<(std::ostream &os, const MLSamplingOptions &obj)
std::string m_option_dataOutputAllowedSet
void print(std::ostream &os) const
It prints the option values.
std::string m_prefix
Class prefix. (ml)
std::string m_help
If non-empty string, options and values are printed to the output file.

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