Commit 6af502d5 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '81-output-should-display-the-exact-computed-solution' into 'master'

Resolve "Output should display the exact computed solution"

Closes #81

See merge request !78
parents a740e783 2f2fb278
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
* Correctly estimate the number of row entries in the matrix backend based on * Correctly estimate the number of row entries in the matrix backend based on
the DG discretization and proper static blocking. This can lead to a the DG discretization and proper static blocking. This can lead to a
performance improvement for large problems. performance improvement for large problems.
* VTK output is now written _before_ the grid is adapted. Previously, the output
displayed the adapted grid and not the one the solution was computed on.
* Grid adaptation is skipped after computing the final solution.
## 1.1.0 (2018-07-27) ## 1.1.0 (2018-07-27)
......
...@@ -155,18 +155,23 @@ bool RichardsSimulation<Traits>::compute_time_step () ...@@ -155,18 +155,23 @@ bool RichardsSimulation<Traits>::compute_time_step ()
template<typename Traits> template<typename Traits>
void RichardsSimulation<Traits>::run () void RichardsSimulation<Traits>::run ()
{ {
const auto t_start = controller->getTime(); output->write_vtk_output(controller->getTime());
output->write_vtk_output(t_start);
while(controller->doStep()) { while(controller->doStep()) {
const auto time = controller->getTime(); const auto time = controller->getTime();
const auto dt = controller->getDT(); const auto dt = controller->getDT();
if(!compute_time_step()){ if(!compute_time_step()){
continue; continue;
} }
if(adaptivity->adapt_grid(*grid, gv, *gfs, *param, *fboundary, time+dt, *uold, *unew)){ // reset operators if grid changes
operator_setup();
}
output->write_vtk_output(controller->getTime()); output->write_vtk_output(controller->getTime());
if(controller->doStep()
&& adaptivity->adapt_grid(*grid, gv, *gfs, *param, *fboundary,
time+dt, // need "old" boundary condition
*uold, *unew))
{
operator_setup(); // reset operators if grid changes
}
} }
} }
......
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