diff --git a/dune/gfe/parallel/globalindex.hh b/dune/gfe/parallel/globalindex.hh index d3c665ed416d5df62360095349faae7f23ee1539..5cced9713689c87fa5a06fc5eb41e3714ab2d0aa 100644 --- a/dune/gfe/parallel/globalindex.hh +++ b/dune/gfe/parallel/globalindex.hh @@ -258,7 +258,11 @@ public: for(Iterator iter = gridview_.template begin<0>();iter!=gridview_.template end<0>(); ++iter) { +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + for (size_t i=0; i<iter->subEntities(CODIM); i++) +#else for (size_t i=0; i<iter->template count<CODIM>(); i++) +#endif { IdType id=globalIdSet.subId(*iter,i,CODIM); /** retrieve the entity's id */ @@ -369,7 +373,11 @@ namespace Dune { for (auto it = gridView.template begin<0>(); it != gridView.template end<0>(); ++it) { // Loop over all vertices +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + for (size_t i=0; i<it->subEntities(2); i++) +#else for (size_t i=0; i<it->template count<2>(); i++) +#endif { //int localIndex = globalVertexIndex.localIndex (*it->template subEntity<2>(i)); int localIndex = p2Mapper.map(*it, i, 2); @@ -380,7 +388,11 @@ namespace Dune { } // Loop over all edges +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + for (size_t i=0; i<it->subEntities(1); i++) +#else for (size_t i=0; i<it->template count<1>(); i++) +#endif { //int localIndex = globalEdgeIndex.localIndex (*it->template subEntity<1>(i)) + gridView.size(2); int localIndex = p2Mapper.map(*it, i, 1); diff --git a/dune/gfe/parallel/uniqueentitypartition.hh b/dune/gfe/parallel/uniqueentitypartition.hh index a215b9b9c53a840d2035f3eccde5d7a8f158c9ef..318291851bb1385d7e4a0a12e0cd74c39f7730c5 100644 --- a/dune/gfe/parallel/uniqueentitypartition.hh +++ b/dune/gfe/parallel/uniqueentitypartition.hh @@ -130,7 +130,11 @@ public: // assign own rank to entities that I might have for(auto it = gridview_.template begin<0>();it!=gridview_.template end<0>(); ++it) +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + for (int i=0; i<it->subEntities(CODIM); i++) +#else for (int i=0; i<it->template count<CODIM>(); i++) +#endif { assignment_[gridview_.indexSet().template subIndex(*it,i,CODIM)] = ( (it->template subEntity<CODIM>(i)->partitionType()==Dune::InteriorEntity) || (it->template subEntity<CODIM>(i)->partitionType()==Dune::BorderEntity) )