[Common] Add output policies in inifile

parent 61436322
......@@ -61,6 +61,12 @@ adding an empty line, make text **bold** or ``monospaced``.
<suggestion> true </suggestion>
</parameter>
<parameter name="policy">
<definition> Policy to write the data. </definition>
<suggestion> endOfStep </suggestion>
<values> endOfStep, none </values>
</parameter>
<parameter name="subsamplingLevel">
<definition> Plot VTK files with virtually refined grids. VTK only
supports bilinear triangulations and displays higher-order solutions
......
......@@ -61,6 +61,12 @@ adding an empty line, make text **bold** or ``monospaced``.
<suggestion> true </suggestion>
</parameter>
<parameter name="policy">
<definition> Policy to write the data. </definition>
<suggestion> all </suggestion>
<values> all, endOfStep, none </values>
</parameter>
<parameter name="subsamplingLevel">
<definition> Plot VTK files with virtually refined grids. VTK only
supports bilinear triangulations and displays higher-order solutions
......
......@@ -25,6 +25,18 @@ RichardsSimulation<Traits>::RichardsSimulation (
dt_before(0.0),
enable_fluxrc(_inifile.get<bool>("fluxReconstruction.enable"))
{
// set output policy
std::string output_policy_str
= inifile.get<std::string>("output.policy");
if (output_policy_str == "all" || output_policy_str == "endOfStep")
this->set_policy(OutputPolicy::EndOfStep);
else if (output_policy_str == "none")
this->set_policy(OutputPolicy::None);
else
DUNE_THROW(NotImplemented,"not known output!");
// --- Grid Function Space ---
this->_log->trace("Setting up GridFunctionSpace");
gfs = std::make_shared<GFS>(GFSHelper::create(gv));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment