Commit fc40bb56 authored by Carsten Gräser's avatar Carsten Gräser

Normalize topologyId of grid capability

Otherwise overloading for the StaticGeometryType
may fail if the same geometry type is encoded
with 0 and 1 in the first digit.
parent 289a7ceb
......@@ -59,7 +59,9 @@ struct AutoGeometryTypeProvider
std::enable_if_t<Dune::Capabilities::hasSingleGeometryType<typename GridView::Grid>::v, int> = 0>
static constexpr auto type(const Entity& entity)
{
return StaticGeometryType<Dune::Capabilities::hasSingleGeometryType<typename GridView::Grid>::topologyId, GridView::dimension, false>{};
constexpr unsigned int topologyId = Dune::Capabilities::hasSingleGeometryType<typename GridView::Grid>::topologyId;
constexpr unsigned int normalizedTopologyId = (topologyId >> 1) << 1;
return StaticGeometryType<normalizedTopologyId, GridView::dimension, false>{};
}
template<class GridView, class Entity,
......
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