Skip to content
Snippets Groups Projects
Commit e1f949ab authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Add construction and setting from parameter file

parent 27c600da
Branches
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
#define DUNE_NUMPROC_HH
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
/** \brief Exception thrown by solvers */
class SolverError : public Dune::Exception {};
......@@ -22,6 +23,17 @@ class SolverError : public Dune::Exception {};
: verbosity_(verbosity)
{}
/** \brief Construct from parameter file. */
NumProc(const Dune::ParameterTree& config)
{
setVerbosity(config);
}
/** \brief Set verbosity from parameter file. */
void setVerbosity(const Dune::ParameterTree& config) {
verbosity_ = config.get<VerbosityMode>("verbosity");
}
/** \brief Set the verbosity level */
void setVerbosity(VerbosityMode verbosity) {verbosity_ = verbosity;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment