Commit 6d25e2bc authored by Carsten Gräser's avatar Carsten Gräser

[bugfix] Replace usage of outdated *Mapper interface

parent 2007b26e
Pipeline #28142 failed with stage
in 92 minutes and 14 seconds
......@@ -10,19 +10,9 @@
template <class GridView,int order>
class DGPQKIndexSet {
//! Parameter for mapper class
template<int dim>
struct ElementMapperLayout
{
bool contains (Dune::GeometryType gt)
{
return gt.dim() == dim;
}
};
public:
DGPQKIndexSet(const GridView gridview) : mapper_(gridview)
DGPQKIndexSet(const GridView gridview) : mapper_(gridview, Dune::mcmgElementLayout())
{
setup(gridview);
}
......@@ -85,7 +75,7 @@ public:
std::vector<int> elementOffsets_;
Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementMapperLayout> mapper_;
Dune::MultipleCodimMultipleGeomTypeMapper<GridView> mapper_;
~ DGPQKIndexSet(){}
......
......@@ -34,11 +34,8 @@ class ErrorFractionMarkingStrategy
enum {dim = GridType::dimension};
//! Layout class for a all codim all geometry type mapper
template<int localDim>
struct AllCodimLayout
{
bool contains (Dune::GeometryType gt DUNE_UNUSED) const
{
struct AllCodimLayout {
bool operator() (Dune::GeometryType gt DUNE_UNUSED, int) const {
return true;
}
};
......@@ -84,7 +81,7 @@ mark(const std::vector<RefinementIndicator<GridType>*>& refinementIndicators,
const std::vector<GridType*>& grids,
double fraction)
{
typedef typename Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType,AllCodimLayout> AllCodimMapper;
typedef typename Dune::LeafMultipleCodimMultipleGeomTypeMapper<GridType> AllCodimMapper;
typedef typename std::multimap<double, std::pair<int,int>, std::greater<double> > ErrorMap;
if (grids.size() != refinementIndicators.size())
......@@ -104,7 +101,7 @@ mark(const std::vector<RefinementIndicator<GridType>*>& refinementIndicators,
for (size_t i=0; i<grids.size(); ++i)
{
// mapper that maps all entities to indices
AllCodimMapper mapper(*grids[i]);
AllCodimMapper mapper(*grids[i], AllCodimLayout());
// initialize bitfield
refineIndex[i].resize(mapper.size(), false);
......@@ -154,7 +151,7 @@ mark(const std::vector<RefinementIndicator<GridType>*>& refinementIndicators,
for (size_t i=0; i<grids.size(); ++i)
{
AllCodimMapper mapper(*grids[i]);
AllCodimMapper mapper(*grids[i], AllCodimLayout());
for (const auto& e : elements(grids[i]->leafGridView()))
{
......
......@@ -31,16 +31,14 @@ class P2HierarchicalWithElementBubblesBasis :
//! Parameter for mapper class
//! In 2d we have vertex, edge, and element dofs
template<int localDim>
struct DofLayout
{
bool contains (Dune::GeometryType gt) {
struct DofLayout {
bool operator() (Dune::GeometryType gt, int dimension) const {
assert(gt.dim() <= 2);
return gt.dim()==0 || gt.dim()==1 || gt.dim() == localDim;
return gt.dim()==0 || gt.dim()==1 || gt.dim() == dimension;
}
};
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GV,DofLayout> MapperType;
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GV> MapperType;
public:
typedef typename Base::GridView GridView;
......@@ -50,7 +48,7 @@ class P2HierarchicalWithElementBubblesBasis :
P2HierarchicalWithElementBubblesBasis(const GridView& gridview) :
Base(gridview),
mapper_(gridview),
mapper_(gridview, DofLayout()),
localFE_()
{}
......
......@@ -32,7 +32,7 @@ class RefinedP0Basis :
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;
......@@ -42,7 +42,7 @@ class RefinedP0Basis :
RefinedP0Basis(const GridView& gridview) :
Base(gridview),
mapper_(gridview)
mapper_(gridview, Dune::mcmgElementLayout())
{}
void update(const GridView& gridview)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment