24 #include <queso/InfiniteDimensionalMCMCSamplerOptions.h>
27 #define UQ_INF_DATA_OUTPUT_DIR_NAME_ODV "chain"
28 #define UQ_INF_DATA_OUTPUT_FILE_NAME_ODV "out.h5"
29 #define UQ_INF_NUM_ITERS_ODV 1000
30 #define UQ_INF_SAVE_FREQ_ODV 1
31 #define UQ_INF_RWMH_STEP_ODV 1e-2
38 : m_prefix((std::string)(prefix) +
"infmcmc_"),
40 m_optionsDesc(new po::options_description(
"Infinite Dimensional MCMC Sampler options")),
41 m_option_help(m_prefix +
"help"),
42 m_option_dataOutputDirName(m_prefix +
"dataOutputDirName"),
43 m_option_dataOutputFileName(m_prefix +
"dataOutputFileName"),
44 m_option_num_iters(m_prefix +
"num_iters"),
45 m_option_save_freq(m_prefix +
"save_freq"),
46 m_option_rwmh_step(m_prefix +
"rwmh_step")
50 "InfiniteDimensionalMCMCSamplerOptions::constructor(1)",
51 "this constructor is incompatible with the abscense of an options input file");
65 "InfiniteDimensionalMCMCSamplerOptions::scanOptionsValues()",
66 "m_optionsDesc variable is NULL");
74 <<
": after reading values of options with prefix '" <<
m_prefix
75 <<
"', state of object is:"
83 po::options_description & optionsDesc)
const
85 optionsDesc.add_options()
86 (
m_option_help.c_str(),
"produce help message for infinite dimensional sampler")
96 po::options_description & optionsDesc)
146 const BaseEnvironment&
std::string m_dataOutputFileName
Name of the HDF5 output file to store chain statistics.
std::string m_option_dataOutputFileName
This class defines the options that specify the behaviour of the MCMC sampler.
~InfiniteDimensionalMCMCSamplerOptions()
Destructor.
void scanOptionsValues()
Scans the input file for options prefixed with prefix.
#define UQ_INF_RWMH_STEP_ODV
int worldRank() const
Returns the process world rank.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
po::variables_map & allOptionsMap() const
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
#define UQ_INF_NUM_ITERS_ODV
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
void getMyOptionValues(po::options_description &optionsDesc)
void print(std::ostream &os) const
Prints this to os.
unsigned int m_save_freq
The frequency at which to save the state of the chain.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
std::string m_option_num_iters
std::string m_option_help
double m_rwmh_step
The proposal step size.
std::string m_prefix
The prefix to look for in the input file.
po::options_description * m_optionsDesc
#define UQ_INF_DATA_OUTPUT_DIR_NAME_ODV
std::string m_dataOutputDirName
Name of the output dir to save infinite dimensional output files to.
#define UQ_INF_SAVE_FREQ_ODV
std::string m_option_save_freq
#define UQ_INF_DATA_OUTPUT_FILE_NAME_ODV
std::string m_option_rwmh_step
void defineMyOptions(po::options_description &optionsDesc) const
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
unsigned int m_num_iters
The total number of iterations to do.
InfiniteDimensionalMCMCSamplerOptions(const BaseEnvironment &env, const char *prefix)
Given prefix, read the input file for parameters named prefix_*.
std::string m_option_dataOutputDirName
const BaseEnvironment & m_env
void scanInputFileForMyOptions(const po::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
const BaseEnvironment & env() const
Returns the QUESO environment.