39    void update(
const GridGeometry& gridGeometry)
 
   42        map_.resize(gridGeometry.numScv());
 
   44        auto fvGeometry = 
localView(gridGeometry);
 
   45        for (
const auto& element : elements(gridGeometry.gridView()))
 
   47            assert(element.partitionType() == Dune::OverlapEntity || element.partitionType() == Dune::InteriorEntity);
 
   49            fvGeometry.bind(element);
 
   52            for (
const auto& scvf : scvfs(fvGeometry))
 
   54                if(scvf.processorBoundary())
 
   57                const auto& ownScv = fvGeometry.scv(scvf.insideScvIdx());
 
   58                const auto ownDofIndex = ownScv.dofIndex();
 
   59                const auto ownScvIndex = ownScv.index();
 
   64                        map_[ownScvIndex].push_back(scvf.outsideScvIdx());
 
   68                        for (
const auto& scv : scvs(fvGeometry))
 
   70                            const auto otherDofIndex = scv.dofIndex();
 
   71                            if (ownDofIndex != otherDofIndex)
 
   72                                map_[scv.index()].push_back(ownScvIndex);
 
   85                        map_[ownScvIndex].push_back(scvf.outsideScvIdx());
 
   96                    const auto& orthogonalScvf = fvGeometry.lateralOrthogonalScvf(scvf);
 
   97                    assert(orthogonalScvf.isLateral());
 
   98                    map_[ownScvIndex].push_back(orthogonalScvf.insideScvIdx());
 
   99                    if (!orthogonalScvf.boundary())
 
  100                        map_[ownScvIndex].push_back(orthogonalScvf.outsideScvIdx());
 
  106        for (
auto& stencil : map_)
 
  108            std::sort(stencil.begin(), stencil.end());
 
  109            stencil.erase(std::unique(stencil.begin(), stencil.end()), stencil.end());