From fdba34e071ddab32a890fb61e9d2e27e35736f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Mon, 20 Jul 2020 17:03:51 +0200 Subject: [PATCH] IsXGroup: Return Explicit Boolean Value Mostly to highlight that 'globalIsXGrup_' holds integers rather than bools. While here, also fix an error message formatting problem. --- opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp b/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp index fa48668c3..c33474b6c 100644 --- a/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp +++ b/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp @@ -1066,9 +1066,9 @@ namespace Opm auto it = wellNameToGlobalIdx_.find(name); if (it == wellNameToGlobalIdx_.end()) - OPM_THROW(std::logic_error, "Could not find global injection group for well" << name); + OPM_THROW(std::logic_error, "Could not find global injection group for well " << name); - return globalIsInjectionGrup_[it->second]; + return globalIsInjectionGrup_[it->second] != 0; } bool isProductionGrup(const std::string& name) const { @@ -1076,9 +1076,9 @@ namespace Opm auto it = wellNameToGlobalIdx_.find(name); if (it == wellNameToGlobalIdx_.end()) - OPM_THROW(std::logic_error, "Could not find global injection group for well" << name); + OPM_THROW(std::logic_error, "Could not find global production group for well " << name); - return globalIsProductionGrup_[it->second]; + return globalIsProductionGrup_[it->second] != 0; } private: