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
......@@ -194,7 +194,7 @@ private:
//! Return an instance of the element mapper
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());
else
return ElementMapper(gridView);
......@@ -203,7 +203,7 @@ private:
//! Return an instance of the vertex mapper
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());
else
return VertexMapper(gridView);
......
Supports Markdown
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