simplify updateProperty_: use elements() range generator

This commit is contained in:
Arne Morten Kvarving 2022-10-05 13:06:24 +02:00
parent 26b8fe01a3
commit c4e2ffea57

View File

@ -2087,12 +2087,8 @@ private:
{
ElementContext elemCtx(this->simulator());
const auto& vanguard = this->simulator().vanguard();
auto elemIt = vanguard.gridView().template begin</*codim=*/0>();
const auto& elemEndIt = vanguard.gridView().template end</*codim=*/0>();
OPM_BEGIN_PARALLEL_TRY_CATCH();
for (; elemIt != elemEndIt; ++elemIt) {
const Element& elem = *elemIt;
for (const auto& elem : elements(vanguard.gridView())) {
elemCtx.updatePrimaryStencil(elem);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);