From bbc33333805b5639361141e7f7802e2ea8fdffcf Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 16 Feb 2022 11:10:56 +0100 Subject: [PATCH] changed: suppress all output in RK solver if not standalone --- Apps/Common/SIMExplicitRK.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Apps/Common/SIMExplicitRK.h b/Apps/Common/SIMExplicitRK.h index 7e4458ba..09824562 100644 --- a/Apps/Common/SIMExplicitRK.h +++ b/Apps/Common/SIMExplicitRK.h @@ -90,11 +90,18 @@ public: //! \copydoc ISolver::solveStep(TimeStep&) virtual bool solveStep(TimeStep& tp) { + int msgLevel = 0; if (alone) solver.getProcessAdm().cout <<"\n step = "<< tp.step <<" time = "<< tp.time.t << std::endl; + else + std::swap(SIMadmin::msgLevel, msgLevel); Vectors stages; - return this->solveRK(stages, tp); + bool result = this->solveRK(stages, tp); + if (!alone) + std::swap(SIMadmin::msgLevel, msgLevel); + + return result; } //! \brief Applies the Runge-Kutta scheme.