diff --git a/CHANGELOG.md b/CHANGELOG.md index e5cb3fc3a8dc6958a213481e30143bb438fb7735..22369e10250f3464fbb856e4315fe4b0cd7b5d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/dune/dorie/model/richards/richards.cc b/dune/dorie/model/richards/richards.cc index 9c2f883e046ea0500f2b04a07d7d6dbbe3095fff..c62eebde7562418db016ddbd704434bab6ca2788 100644 --- a/dune/dorie/model/richards/richards.cc +++ b/dune/dorie/model/richards/richards.cc @@ -18,7 +18,9 @@ RichardsSimulation::RichardsSimulation ( gv(grid->leafGridView()), mbe_slop(estimate_mbe_entries( 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::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::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::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::write_data () const } } // namespace Dorie -} // namespace Dune \ No newline at end of file +} // namespace Dune