24 #include <boost/program_options.hpp>
26 #include <queso/InfiniteDimensionalMCMCSamplerOptions.h>
29 #define UQ_INF_DATA_OUTPUT_DIR_NAME_ODV "chain"
30 #define UQ_INF_DATA_OUTPUT_FILE_NAME_ODV "out.h5"
31 #define UQ_INF_NUM_ITERS_ODV 1000
32 #define UQ_INF_SAVE_FREQ_ODV 1
33 #define UQ_INF_RWMH_STEP_ODV 1e-2
40 : m_prefix((std::string)(prefix) +
"infmcmc_"),
48 m_option_help(m_prefix +
"help"),
49 m_option_dataOutputDirName(m_prefix +
"dataOutputDirName"),
50 m_option_dataOutputFileName(m_prefix +
"dataOutputFileName"),
51 m_option_num_iters(m_prefix +
"num_iters"),
52 m_option_save_freq(m_prefix +
"save_freq"),
53 m_option_rwmh_step(m_prefix +
"rwmh_step")
100 os << (*(obj.
m_parser)) << std::endl;
105 const BaseEnvironment&
std::string m_option_dataOutputFileName
const BaseEnvironment & m_env
std::string m_option_help
std::string m_option_rwmh_step
#define UQ_INF_RWMH_STEP_ODV
#define UQ_INF_DATA_OUTPUT_DIR_NAME_ODV
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
#define UQ_INF_DATA_OUTPUT_FILE_NAME_ODV
std::string m_dataOutputDirName
Name of the output dir to save infinite dimensional output files to.
std::string m_option_num_iters
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::string m_dataOutputFileName
Name of the HDF5 output file to store chain statistics.
double m_rwmh_step
The proposal step size.
#define queso_require_equal_to_msg(expr1, expr2, msg)
const BaseEnvironment & env() const
Returns the QUESO environment.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
void scanInputFile()
This is the method that parses the input file.
std::string m_option_save_freq
virtual ~InfiniteDimensionalMCMCSamplerOptions()
Destructor.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
void registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
unsigned int m_save_freq
The frequency at which to save the state of the chain.
BoostInputOptionsParser * m_parser
This class defines the options that specify the behaviour of the MCMC sampler.
#define UQ_INF_SAVE_FREQ_ODV
void print(std::ostream &os) const
Prints this to os.
InfiniteDimensionalMCMCSamplerOptions(const BaseEnvironment &env, const char *prefix)
Given prefix, read the input file for parameters named prefix_*.
std::string m_option_dataOutputDirName
#define queso_require_greater_msg(expr1, expr2, msg)
#define UQ_INF_NUM_ITERS_ODV
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
unsigned int m_num_iters
The total number of iterations to do.