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/datahandleif.hh>
|
||||||
#include <dune/grid/common/gridenums.hh>
|
#include <dune/grid/common/gridenums.hh>
|
||||||
|
#include <dune/grid/common/partitionset.hh>
|
||||||
#include <dune/istl/bcrsmatrix.hh>
|
#include <dune/istl/bcrsmatrix.hh>
|
||||||
#include <dune/istl/scalarproducts.hh>
|
#include <dune/istl/scalarproducts.hh>
|
||||||
#include <dune/istl/operators.hh>
|
#include <dune/istl/operators.hh>
|
||||||
@ -68,11 +69,9 @@ class ElementBorderListFromGrid
|
|||||||
, blackList_(blackList)
|
, blackList_(blackList)
|
||||||
, borderList_(borderList)
|
, borderList_(borderList)
|
||||||
{
|
{
|
||||||
auto elemIt = gridView_.template begin<0>();
|
for (const auto& elem : elements(gridView_)) {
|
||||||
const auto& elemEndIt = gridView_.template end<0>();
|
if (elem.partitionType() != Dune::InteriorEntity) {
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
Index elemIdx = static_cast<Index>(map_.index(elem));
|
||||||
if (elemIt->partitionType() != Dune::InteriorEntity) {
|
|
||||||
Index elemIdx = static_cast<Index>(map_.index(*elemIt));
|
|
||||||
blackList_.addIndex(elemIdx);
|
blackList_.addIndex(elemIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user