mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
AquiferNumerical: use elements range generator
This commit is contained in:
parent
0da1ff494b
commit
72bed4449b
@ -176,15 +176,9 @@ private:
|
|||||||
|
|
||||||
ElementContext elem_ctx(this->ebos_simulator_);
|
ElementContext elem_ctx(this->ebos_simulator_);
|
||||||
const auto& gridView = this->ebos_simulator_.gridView();
|
const auto& gridView = this->ebos_simulator_.gridView();
|
||||||
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, Dune::Partitions::interior)) {
|
||||||
const auto& elem = *elemIt;
|
|
||||||
if (elem.partitionType() != Dune::InteriorEntity) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
elem_ctx.updatePrimaryStencil(elem);
|
elem_ctx.updatePrimaryStencil(elem);
|
||||||
|
|
||||||
const size_t cell_index = elem_ctx.globalSpaceIndex(/*spaceIdx=*/0, /*timeIdx=*/0);
|
const size_t cell_index = elem_ctx.globalSpaceIndex(/*spaceIdx=*/0, /*timeIdx=*/0);
|
||||||
@ -240,13 +234,7 @@ private:
|
|||||||
|
|
||||||
ElementContext elem_ctx(this->ebos_simulator_);
|
ElementContext elem_ctx(this->ebos_simulator_);
|
||||||
const auto& gridView = this->ebos_simulator_.gridView();
|
const auto& gridView = this->ebos_simulator_.gridView();
|
||||||
auto elemIt = gridView.template begin</*codim=*/0>();
|
for (const auto& elem : elements(gridView, Dune::Partitions::interior)) {
|
||||||
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
|
||||||
const auto& elem = *elemIt;
|
|
||||||
if (elem.partitionType() != Dune::InteriorEntity) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// elem_ctx.updatePrimaryStencil(elem);
|
// elem_ctx.updatePrimaryStencil(elem);
|
||||||
elem_ctx.updateStencil(elem);
|
elem_ctx.updateStencil(elem);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user