mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
eclgenericwriter: use elements and intersections range generators
This commit is contained in:
@@ -285,16 +285,8 @@ computeTrans_(const std::unordered_map<int,int>& cartesianToActive, const std::f
|
|||||||
using GlobElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView>;
|
using GlobElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView>;
|
||||||
GlobElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
GlobElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
|
||||||
auto elemIt = globalGridView.template begin</*codim=*/0>();
|
for (const auto& elem : elements(globalGridView)) {
|
||||||
const auto& elemEndIt = globalGridView.template end</*codim=*/0>();
|
for (const auto& is : intersections(globalGridView, elem)) {
|
||||||
for (; elemIt != elemEndIt; ++ elemIt) {
|
|
||||||
const auto& elem = *elemIt;
|
|
||||||
|
|
||||||
auto isIt = globalGridView.ibegin(elem);
|
|
||||||
const auto& isEndIt = globalGridView.iend(elem);
|
|
||||||
for (; isIt != isEndIt; ++ isIt) {
|
|
||||||
const auto& is = *isIt;
|
|
||||||
|
|
||||||
if (!is.neighbor())
|
if (!is.neighbor())
|
||||||
continue; // intersection is on the domain boundary
|
continue; // intersection is on the domain boundary
|
||||||
|
|
||||||
@@ -373,16 +365,8 @@ exportNncStructure_(const std::unordered_map<int,int>& cartesianToActive, const
|
|||||||
// Cartesian index mapper for the serial I/O grid
|
// Cartesian index mapper for the serial I/O grid
|
||||||
const auto& equilCartMapper = *equilCartMapper_;
|
const auto& equilCartMapper = *equilCartMapper_;
|
||||||
const auto& cartDims = cartMapper_.cartesianDimensions();
|
const auto& cartDims = cartMapper_.cartesianDimensions();
|
||||||
auto elemIt = globalGridView.template begin</*codim=*/0>();
|
for (const auto& elem : elements(globalGridView)) {
|
||||||
const auto& elemEndIt = globalGridView.template end</*codim=*/0>();
|
for (const auto& is : intersections(globalGridView, elem)) {
|
||||||
for (; elemIt != elemEndIt; ++ elemIt) {
|
|
||||||
const auto& elem = *elemIt;
|
|
||||||
|
|
||||||
auto isIt = globalGridView.ibegin(elem);
|
|
||||||
const auto& isEndIt = globalGridView.iend(elem);
|
|
||||||
for (; isIt != isEndIt; ++ isIt) {
|
|
||||||
const auto& is = *isIt;
|
|
||||||
|
|
||||||
if (!is.neighbor())
|
if (!is.neighbor())
|
||||||
continue; // intersection is on the domain boundary
|
continue; // intersection is on the domain boundary
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user