diff --git a/dune/fufem/differencenormsquared.hh b/dune/fufem/differencenormsquared.hh index 89e90189a66cb08867eb70bace008da8756d5e65..8853020c418ff6322c09edebc99e65820d23c5b2 100644 --- a/dune/fufem/differencenormsquared.hh +++ b/dune/fufem/differencenormsquared.hh @@ -132,8 +132,8 @@ public: // Find the corresponding coarse grid element on the adaptive grid. // This is a linear algorithm, but we expect the coarse grid to be small. // //////////////////////////////////////////////////////////////////// - LevelMultipleCodimMultipleGeomTypeMapper<GridType,Dune::MCMGElementLayout> uniformP0Mapper (targetGrid, 0); - LevelMultipleCodimMultipleGeomTypeMapper<GridType,Dune::MCMGElementLayout> adaptiveP0Mapper(sourceGrid, 0); + LevelMultipleCodimMultipleGeomTypeMapper<GridType> uniformP0Mapper (targetGrid, 0, Dune::mcmgElementLayout()); + LevelMultipleCodimMultipleGeomTypeMapper<GridType> adaptiveP0Mapper(sourceGrid, 0, Dune::mcmgElementLayout()); const auto coarseIndex = uniformP0Mapper.index(element); typename GridType::LevelGridView sourceLevelView = sourceGrid.levelGridView(0); diff --git a/dune/fufem/estimators/fractionalmarking.hh b/dune/fufem/estimators/fractionalmarking.hh index 99cac76287efb0be9ca3a02f73977f7767353e32..c01cb2991f1850273b1af4f2e8bd76f6d77959da 100644 --- a/dune/fufem/estimators/fractionalmarking.hh +++ b/dune/fufem/estimators/fractionalmarking.hh @@ -109,7 +109,7 @@ mark(const std::vector<std::shared_ptr<RefinementIndicator<GridType> > >& refine minGridError[i] = std::numeric_limits<field_type>::max(); maxGridError[i] = -std::numeric_limits<field_type>::max(); - Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType,P0Layout> p0Mapper(*grids[i]); + Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType> p0Mapper(*grids[i], Dune::mcmgElementLayout()); const auto& leafView = grids[i]->leafGridView(); @@ -169,7 +169,7 @@ mark(const std::vector<std::shared_ptr<RefinementIndicator<GridType> > >& refine for (size_t i=0; i<grids.size(); i++) { - Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType,P0Layout> p0Mapper(*grids[i]); + Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType> p0Mapper(*grids[i], Dune::mcmgElementLayout()); for (const auto& e : elements(grids[i]->leafGridView())) if (refinedElements[i][p0Mapper.index(e)][0]) diff --git a/dune/fufem/functionspacebases/p0basis.hh b/dune/fufem/functionspacebases/p0basis.hh index 86f48dcd7fce8f0ddab90c6710e9cba16310d3b6..f32129a57ff959992b4fc5cfa893d17071d02120 100644 --- a/dune/fufem/functionspacebases/p0basis.hh +++ b/dune/fufem/functionspacebases/p0basis.hh @@ -46,7 +46,7 @@ class P0Basis : using Base::dim; using Base::gridview_; - typedef typename Dune::MultipleCodimMultipleGeomTypeMapper<GV, Dune::MCMGElementLayout > P0BasisMapper; + typedef typename Dune::MultipleCodimMultipleGeomTypeMapper<GV> P0BasisMapper; public: typedef typename Base::GridView GridView; @@ -56,7 +56,7 @@ class P0Basis : P0Basis(const GridView& gridview) : Base(gridview), - mapper_(gridview) + mapper_(gridview, Dune::mcmgElementLayout()) {} size_t size() const diff --git a/dune/fufem/functionspacebases/p2nodalbasis.hh b/dune/fufem/functionspacebases/p2nodalbasis.hh index 1fa51f2fe7a698830aca3aa373cd140edebd22f7..266685a6357cb021c5c32864bb465953cfa1fe79 100644 --- a/dune/fufem/functionspacebases/p2nodalbasis.hh +++ b/dune/fufem/functionspacebases/p2nodalbasis.hh @@ -25,32 +25,19 @@ #include <dune/fufem/functionspacebases/functionspacebasis.hh> - -template<int dim> -struct P2MapperLayout -{ - bool contains (Dune::GeometryType gt) const - { - // All vertices and all edges carry a dof - if (gt.dim()==0 || gt.dim()==1) - return true; - - // Quadrilaterals and cubes carry a dof - return gt.isCube(); - } -}; - template<class GridView> class P2BasisMapper : - public Dune::MultipleCodimMultipleGeomTypeMapper<GridView, P2MapperLayout> + public Dune::MultipleCodimMultipleGeomTypeMapper<GridView> { - typedef typename Dune::MultipleCodimMultipleGeomTypeMapper<GridView, P2MapperLayout> Base; + typedef typename Dune::MultipleCodimMultipleGeomTypeMapper<GridView> Base; typedef typename GridView::Grid::template Codim<0>::Entity Element; public: P2BasisMapper(const GridView& gridView) : - Base(gridView) + Base(gridView, + // all vertices, edges, and quadrilaterals/cubes carry a dof + [](Dune::GeometryType gt, int dimgrid) {return gt.dim()==0 or gt.dim()==1 or gt.isCube();}) {} typename Base::Index index(const Element& e, const Dune::LocalKey& localKey) const