From f97b76a9b59a4786b8a7753114811517c36d9b81 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Fri, 29 Nov 2019 17:30:18 +0100 Subject: [PATCH] List the matching wells for Action eval --- ebos/eclproblem.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 5f317b90c..eb7493d29 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -1056,11 +1056,18 @@ public: for (const auto& action : actions.pending(simTime)) { auto actionResult = action->eval(simTime, context); if (actionResult) { - std::string msg = "The action: " + action->name() + " evaluated to true at report step: " + std::to_string(reportStep); + std::string wells_string; + const auto& matching_wells = actionResult.wells(); + if (matching_wells.size() > 0) { + for (std::size_t iw = 0; iw < matching_wells.size() - 1; iw++) + wells_string += matching_wells[iw] + ", "; + wells_string += matching_wells.back(); + } + std::string msg = "The action: " + action->name() + " evaluated to true at report step: " + std::to_string(reportStep) + " wells: " + wells_string; Opm::OpmLog::info(msg); schedule.applyAction(reportStep, *action, actionResult); } else { - std::string msg = "The action: " + action->name() + " evaluated to false sat report step: " + std::to_string(reportStep); + std::string msg = "The action: " + action->name() + " evaluated to false at report step: " + std::to_string(reportStep); Opm::OpmLog::info(msg); } }