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