From c86470e7684f8129668e812f31c0b0f27e9cf211 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 3 Jun 2019 11:11:41 +0200 Subject: [PATCH] tracer model: fix a few output messages fixes some typos, adds better wording and fixes some duplication issues on parallel runs. --- ebos/eclproblem.hh | 6 ++++-- ebos/ecltracermodel.hh | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 5a70402e3..f28a47750 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -2499,8 +2499,10 @@ private: for (size_t pvtRegionIdx = 0; pvtRegionIdx < maxDRv_.size(); ++pvtRegionIdx) maxDRv_[pvtRegionIdx] = oilVaporizationControl.getMaxDRVDT(pvtRegionIdx)*simulator.timeStepSize(); - if (tracerModel().numTracers() > 0) - std::cout << "Warning: Restart is not implemented for the tracer model, it will initialize with initial tracer concentration" << std::endl; + if (tracerModel().numTracers() > 0 && this->gridView().comm().rank() == 0) + std::cout << "Warning: Restart is not implemented for the tracer model, it will initialize itself " + << "with the initial tracer concentration.\n" + << std::flush; // assign the restart solution to the current solution. note that we still need // to compute real initial solution after this because the initial fluid states diff --git a/ebos/ecltracermodel.hh b/ebos/ecltracermodel.hh index fedb4b8fd..e2a988e75 100644 --- a/ebos/ecltracermodel.hh +++ b/ebos/ecltracermodel.hh @@ -101,17 +101,22 @@ public: return; // tracer treatment is supposed to be disabled if (!EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel)) { - std::cout << "Warning: Tracer model is disabled but the deck contatins the TRACERS keyword \n"; - std::cout << "The tracer model must be activated using --enable-tracer-model=true "<< std::endl; + if (simulator_.gridView().comm().rank() == 0) { + std::cout << "Warning: Tracer model is disabled but the deck contains the TRACERS keyword\n" + << "The tracer model must be explictly activated using --enable-tracer-model=true\n" + << std::flush; + } return; // Tracer transport must be enabled by the user } if (!deck.hasKeyword("TRACER")) - throw std::runtime_error("the deck does not contain the TRACER keyword"); + throw std::runtime_error("The deck does not contain the TRACER keyword"); if (simulator_.gridView().comm().size() > 1) { tracerNames_.resize(0); - std::cout << "Warning: Tracer model is not compatible with mpi run" << std::endl; + if (simulator_.gridView().comm().rank() == 0) + std::cout << "Warning: The tracer model currently does not work for parallel runs\n" + << std::flush; return; }