Skip to content
Snippets Groups Projects
Commit 0626ef73 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/reordering-mapper' into 'master'

[basegridgeometry] Use more robust way to choose ctor of mappers

Closes #932

See merge request !2245
parents 4f233aef 8233df46
No related branches found
No related tags found
1 merge request!2245[basegridgeometry] Use more robust way to choose ctor of mappers
...@@ -194,7 +194,7 @@ private: ...@@ -194,7 +194,7 @@ private:
//! Return an instance of the element mapper //! Return an instance of the element mapper
ElementMapper makeElementMapper_(const GridView& gridView) const ElementMapper makeElementMapper_(const GridView& gridView) const
{ {
if constexpr (std::is_same_v<ElementMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>) if constexpr (std::is_constructible<ElementMapper, GridView, Dune::MCMGLayout>())
return ElementMapper(gridView, Dune::mcmgElementLayout()); return ElementMapper(gridView, Dune::mcmgElementLayout());
else else
return ElementMapper(gridView); return ElementMapper(gridView);
...@@ -203,7 +203,7 @@ private: ...@@ -203,7 +203,7 @@ private:
//! Return an instance of the vertex mapper //! Return an instance of the vertex mapper
VertexMapper makeVertexMapper_(const GridView& gridView) const VertexMapper makeVertexMapper_(const GridView& gridView) const
{ {
if constexpr (std::is_same_v<VertexMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>) if constexpr (std::is_constructible<VertexMapper, GridView, Dune::MCMGLayout>())
return VertexMapper(gridView, Dune::mcmgVertexLayout()); return VertexMapper(gridView, Dune::mcmgVertexLayout());
else else
return VertexMapper(gridView); return VertexMapper(gridView);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment