Skip to content
Snippets Groups Projects
Commit e52fa3b0 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[1p][test] update grid variables prior to output

In case of global caching, the grid variables have to be updated
as otherwise the old solution is written to disk.
parent 4eaa392b
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,7 @@ int main(int argc, char** argv) try
// we solve Ax = -r to save update and copy
(*r) *= -1.0;
// // solve the linear system
// solve the linear system
Dune::Timer solverTimer;
using LinearSolver = SSORCGBackend<TypeTag>;
auto linearSolver = std::make_shared<LinearSolver>();
......@@ -128,6 +128,11 @@ int main(int argc, char** argv) try
solverTimer.stop();
if (mpiHelper.rank() == 0) std::cout << " took " << solverTimer.elapsed() << " seconds." << std::endl;
// the grid variables need to be up to date for subsequent output
Dune::Timer updateTimer; std::cout << "Updating variables ..." << std::flush;
gridVariables->update(x);
updateTimer.elapsed(); std::cout << " took " << updateTimer.elapsed() << std::endl;
// output result to vtk
vtkWriter.write(1.0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment