From b5ec1906e10fefea27884d0f1141180b1e121923 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 17 Oct 2022 10:47:48 +0200 Subject: [PATCH] TpfaLinearizer: use elements range generator --- opm/models/discretization/common/tpfalinearizer.hh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/opm/models/discretization/common/tpfalinearizer.hh b/opm/models/discretization/common/tpfalinearizer.hh index 250a6e41e..ae13410c2 100644 --- a/opm/models/discretization/common/tpfalinearizer.hh +++ b/opm/models/discretization/common/tpfalinearizer.hh @@ -318,10 +318,7 @@ private: std::vector loc_nbinfo; const auto& materialLawManager = problem_().materialLawManager(); using FaceDirection = FaceDir::DirEnum; - ElementIterator elemIt = gridView_().template begin<0>(); - const ElementIterator elemEndIt = gridView_().template end<0>(); - for (; elemIt != elemEndIt; ++elemIt) { - const Element& elem = *elemIt; + for (const auto& elem : elements(gridView_())) { stencil.update(elem); for (unsigned primaryDofIdx = 0; primaryDofIdx < stencil.numPrimaryDof(); ++primaryDofIdx) {