getQuasiImplesWeights: use elements range generator

This commit is contained in:
Arne Morten Kvarving 2022-10-12 14:27:20 +02:00
parent a884e3c1d6
commit 3137cb5194

View File

@ -100,11 +100,9 @@ namespace Amg
VectorBlockType rhs(0.0);
rhs[pressureVarIndex] = 1.0;
int index = 0;
auto elemIt = gridView.template begin</*codim=*/0>();
const auto& elemEndIt = gridView.template end</*codim=*/0>();
OPM_BEGIN_PARALLEL_TRY_CATCH();
for (; elemIt != elemEndIt; ++elemIt) {
elemCtx.updatePrimaryStencil(*elemIt);
for (const auto& elem : elements(gridView)) {
elemCtx.updatePrimaryStencil(elem);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
Dune::FieldVector<Evaluation, numEq> storage;
model.localLinearizer(threadId).localResidual().computeStorage(storage,elemCtx,/*spaceIdx=*/0, /*timeIdx=*/0);