From 247d4cb4329f8d8fbc154f1dd967f9c8c84f10ab Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 26 Aug 2024 15:06:28 +0200 Subject: [PATCH] elasticity_preconditioners: avoid unnecessary copy --- opm/elasticity/elasticity_preconditioners.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/elasticity/elasticity_preconditioners.cpp b/opm/elasticity/elasticity_preconditioners.cpp index b6d9dec..2fc128b 100644 --- a/opm/elasticity/elasticity_preconditioners.cpp +++ b/opm/elasticity/elasticity_preconditioners.cpp @@ -44,7 +44,7 @@ Schwarz::type* Schwarz::setup2(std::shared_ptr& op, int nel2 = gv.logicalCartesianSize()[1]; rows.resize(nel1/cps*nel2/cps); - auto set = gv.leafGridView().indexSet(); + const auto& set = gv.leafGridView().indexSet(); for (auto it = gv.leafGridView().begin<0>(), e = gv.leafGridView().end<0>(); it != e; ++it) { std::array ijk;