From 85d2c1f7ec55e029e4d0077b26c1c29ccfaa6fea Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Thu, 24 Mar 2016 19:03:50 +0100 Subject: [PATCH] [implicit] Remove the shouldWriteOutput check inside writeOutput When calling writeOutput one would expect that the output is actually written to file. Instead this might not have happened in the old version. This commit makes the implicit problem consistent with the sequential models. Before calling writeOutput one should ask if shouldWriteOutput is true. This is already consistently done all over dumux, so this commit removes the double checking. --- dumux/implicit/problem.hh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/dumux/implicit/problem.hh b/dumux/implicit/problem.hh index df75db7b51..2e1c21e1ae 100644 --- a/dumux/implicit/problem.hh +++ b/dumux/implicit/problem.hh @@ -978,18 +978,16 @@ public: void writeOutput(const bool verbose = true) { // write the current result to disk - if (asImp_().shouldWriteOutput()) { - if (verbose && gridView().comm().rank() == 0) - std::cout << "Writing result file for \"" << asImp_().name() << "\"\n"; - - // calculate the time _after_ the time was updated - Scalar t = timeManager().time() + timeManager().timeStepSize(); - createResultWriter_(); - resultWriter_->beginWrite(t); - model().addOutputVtkFields(model().curSol(), *resultWriter_); - asImp_().addOutputVtkFields(); - resultWriter_->endWrite(); - } + if (verbose && gridView().comm().rank() == 0) + std::cout << "Writing result file for \"" << asImp_().name() << "\"\n"; + + // calculate the time _after_ the time was updated + Scalar t = timeManager().time() + timeManager().timeStepSize(); + createResultWriter_(); + resultWriter_->beginWrite(t); + model().addOutputVtkFields(model().curSol(), *resultWriter_); + asImp_().addOutputVtkFields(); + resultWriter_->endWrite(); } /*! -- GitLab