mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
getQuasiImplesWeights: use elements range generator
This commit is contained in:
parent
a884e3c1d6
commit
3137cb5194
@ -100,11 +100,9 @@ namespace Amg
|
|||||||
VectorBlockType rhs(0.0);
|
VectorBlockType rhs(0.0);
|
||||||
rhs[pressureVarIndex] = 1.0;
|
rhs[pressureVarIndex] = 1.0;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
auto elemIt = gridView.template begin</*codim=*/0>();
|
|
||||||
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
|
||||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
for (const auto& elem : elements(gridView)) {
|
||||||
elemCtx.updatePrimaryStencil(*elemIt);
|
elemCtx.updatePrimaryStencil(elem);
|
||||||
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
|
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
|
||||||
Dune::FieldVector<Evaluation, numEq> storage;
|
Dune::FieldVector<Evaluation, numEq> storage;
|
||||||
model.localLinearizer(threadId).localResidual().computeStorage(storage,elemCtx,/*spaceIdx=*/0, /*timeIdx=*/0);
|
model.localLinearizer(threadId).localResidual().computeStorage(storage,elemCtx,/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||||
|
Loading…
Reference in New Issue
Block a user