From 60ba51aea0bd44e522ca47ffa0d3ff904993ee20 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 12 Sep 2016 12:02:20 +0200 Subject: [PATCH] Do exclude SHUT wells from lookup of deactivated wells. This should be prevent some unnecessary find calls in the set. --- opm/core/wells/WellsManager_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/core/wells/WellsManager_impl.hpp b/opm/core/wells/WellsManager_impl.hpp index 440270b01..c19a885e0 100644 --- a/opm/core/wells/WellsManager_impl.hpp +++ b/opm/core/wells/WellsManager_impl.hpp @@ -142,12 +142,12 @@ void WellsManager::createWellsFromSpecs(std::vector& wells, size_t for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) { const auto* well = (*wellIter); - if ( ignored_wells.find(well->name()) != ignored_wells.end() ) { - wells_on_proc[ wellIter - wells.begin() ] = 0; + if (well->getStatus(timeStep) == WellCommon::SHUT) { continue; } - if (well->getStatus(timeStep) == WellCommon::SHUT) { + if ( ignored_wells.find(well->name()) != ignored_wells.end() ) { + wells_on_proc[ wellIter - wells.begin() ] = 0; continue; }