Skip to content

Commit

Permalink
Granular construction of MhOptionsValues
Browse files Browse the repository at this point in the history
Refactor in support of libqueso#569 to enable various layered
phases of constructing MhOptionsValues.  This mirrors work done in
EnvOptionsValues.
  • Loading branch information
briadam committed Oct 3, 2017
1 parent 54a481c commit dfce945
Show file tree
Hide file tree
Showing 3 changed files with 487 additions and 693 deletions.
1 change: 1 addition & 0 deletions src/misc/src/Miscellaneous.C
Original file line number Diff line number Diff line change
Expand Up @@ -616,3 +616,4 @@ template void QUESO::MiscCheckTheParallelEnvironment<QUESO::GslVector, QUESO::Gs
template bool QUESO::MiscCheckForSameValueInAllNodes<bool>(bool&, double, QUESO::MpiComm const&, char const*);
template bool QUESO::MiscCheckForSameValueInAllNodes<double>(double&, double, QUESO::MpiComm const&, char const*);
template std::string QUESO::container_to_string(const std::set<unsigned int>& container);
template std::string QUESO::container_to_string(const std::vector<double>& container);
16 changes: 13 additions & 3 deletions src/stats/inc/MetropolisHastingsSGOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ class MhOptionsValues
/*! It assigns the same options values from \c src to \c this.*/
MhOptionsValues (const MhOptionsValues& src);

//! Set parameter option names to begin with prefix
void set_prefix(const std::string& prefix);

//! Set default values for parameter options
void set_defaults();

//! Given prefix, read the input file for parameters named "prefix"+*
void parse(const BaseEnvironment& env, const std::string& prefix);

//! Destructor
virtual ~MhOptionsValues ();
//@}
Expand Down Expand Up @@ -747,9 +756,7 @@ class MhOptionsValues
//! Copies the option values from \c src to \c this.
void copy(const MhOptionsValues& src);

// We pass the the passed environment to get access to the MPI ranks etc for
// sanity checks
void checkOptions(const BaseEnvironment * env);
void checkOptions();

friend std::ostream & operator<<(std::ostream & os,
const MhOptionsValues & obj);
Expand Down Expand Up @@ -790,6 +797,9 @@ class MetropolisHastingsSGOptions
//! Copy constructor
MetropolisHastingsSGOptions(const MLSamplingLevelOptions& mlOptions);

//! Set parameter option names to begin with prefix
void set_prefix(const std::string& prefix);

//! Destructor
~MetropolisHastingsSGOptions();
//@}
Expand Down
Loading

0 comments on commit dfce945

Please sign in to comment.