mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ElementBorderListFromGrid: use elements range generator
This commit is contained in:
parent
85ac4160ee
commit
ce8d626872
@ -32,6 +32,7 @@
|
||||
|
||||
#include <dune/grid/common/datahandleif.hh>
|
||||
#include <dune/grid/common/gridenums.hh>
|
||||
#include <dune/grid/common/partitionset.hh>
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/istl/scalarproducts.hh>
|
||||
#include <dune/istl/operators.hh>
|
||||
@ -68,11 +69,9 @@ class ElementBorderListFromGrid
|
||||
, blackList_(blackList)
|
||||
, borderList_(borderList)
|
||||
{
|
||||
auto elemIt = gridView_.template begin<0>();
|
||||
const auto& elemEndIt = gridView_.template end<0>();
|
||||
for (; elemIt != elemEndIt; ++elemIt) {
|
||||
if (elemIt->partitionType() != Dune::InteriorEntity) {
|
||||
Index elemIdx = static_cast<Index>(map_.index(*elemIt));
|
||||
for (const auto& elem : elements(gridView_)) {
|
||||
if (elem.partitionType() != Dune::InteriorEntity) {
|
||||
Index elemIdx = static_cast<Index>(map_.index(elem));
|
||||
blackList_.addIndex(elemIdx);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user