Skip to content

Commit

Permalink
Granular construction of MhOptionsValues
Browse files Browse the repository at this point in the history
Refactor in support of #569 to enable various layered
phases of constructing MhOptionsValues.  This mirrors work done in
EnvOptionsValues.
  • Loading branch information
briadam committed Oct 12, 2017
1 parent 96090ea commit 5398d53
Show file tree
Hide file tree
Showing 3 changed files with 404 additions and 503 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);
13 changes: 10 additions & 3 deletions src/stats/inc/MetropolisHastingsSGOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ class MhOptionsValues
/*! Extract options from MLSamplingLevelOptions to \c this.*/
MhOptionsValues (const MLSamplingLevelOptions& ml_opts);

//! 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 @@ -751,9 +760,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
Loading

0 comments on commit 5398d53

Please sign in to comment.