Commit 6606dcc8 authored by Lukas Riedel's avatar Lukas Riedel

Fix time variables applied to solver in Richards simulation

parent cf5388f2
......@@ -111,6 +111,10 @@
It dumps its data into a YAML file which is then loaded for writing
the default configuration files and the cheat sheet.
### Fixed
* Solver in `RichardsSimulation` was using the wrong time variable.
[!116](https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/merge_requests/116)
### Deprecated
* The configuration file key `[parameters.interpolation]` is deprecated due to
the new scheme for storing parameterization data. DORiE now only supports
......@@ -198,4 +202,4 @@
## 1.0.0 (2018-03-28)
First stable version.
\ No newline at end of file
First stable version.
......@@ -18,7 +18,9 @@ RichardsSimulation<Traits>::RichardsSimulation (
gv(grid->leafGridView()),
mbe_slop(estimate_mbe_entries<typename MBE::size_type>(
Traits::dim,Traits::GridGeometryType)),
mbe_tlop(1)
mbe_tlop(1),
time_before(0.0),
dt_before(0.0)
{
Dune::Timer timer;
......@@ -140,7 +142,7 @@ void RichardsSimulation<Traits>::step()
bool step_succeed = false;
while(not step_succeed)
{
const RF t = controller->getTime();
const RF time = controller->getTime();
const RF dt = controller->getDT();
bool exception = false;
const bool solver_warnings = verbose > 0 && helper.rank() == 0 ?
......@@ -153,7 +155,7 @@ void RichardsSimulation<Traits>::step()
if (not solver_warnings)
dwarn.push(false);
osm->apply(time_before, dt, *u, *unext);
osm->apply(time, dt, *u, *unext);
if (not solver_warnings)
dwarn.pop();
......@@ -173,9 +175,9 @@ void RichardsSimulation<Traits>::step()
}
// saving last times for adaptivity
time_before = t;
time_before = time;
dt_before = dt;
// controller reacts to outcome of solution
step_succeed = controller->validate(exception);
}
......@@ -248,4 +250,4 @@ void RichardsSimulation<Traits>::write_data () const
}
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
} // namespace Dune
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