From 5b4acd5417ea53f36b96675da1fd6a0a6199a2dd Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Tue, 21 Apr 2020 14:28:40 +0200 Subject: [PATCH] Do not query wells for solver if it is actually not needed. --- opm/simulators/linalg/ISTLSolverEbos.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index 3bd8f478e..1257097f8 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -359,14 +359,13 @@ protected: } #endif extractParallelGridInformationToISTL(simulator_.vanguard().grid(), parallelInformation_); - const auto wellsForConn = simulator_.vanguard().schedule().getWellsatEnd(); const bool useWellConn = EWOMS_GET_PARAM(TypeTag, bool, MatrixAddWellContributions); ownersFirst_ = EWOMS_GET_PARAM(TypeTag, bool, OwnerCellsFirst); interiorCellNum_ = detail::numMatrixRowsToUseInSolver(simulator_.vanguard().grid(), ownersFirst_); if (!ownersFirst_ || parameters_.linear_solver_use_amg_ || parameters_.use_cpr_ ) { - detail::setWellConnections(gridForConn, wellsForConn, useWellConn, wellConnectionsGraph_); + detail::setWellConnections(gridForConn, simulator_.vanguard().schedule().getWellsatEnd(), useWellConn, wellConnectionsGraph_); // For some reason simulator_.model().elementMapper() is not initialized at this stage // Hence const auto& elemMapper = simulator_.model().elementMapper(); does not work. // Set it up manually