Skip to content
Snippets Groups Projects
Commit 19e22b18 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'feature/SingleCodimSingleGeomTypeMapper' into 'master'

[basegridgeometry] Allow use of SingleCodimSingleGeomTypeMapper

See merge request !2218
parents 7510e6cc 6e8123d1
No related branches found
No related tags found
1 merge request!2218[basegridgeometry] Allow use of SingleCodimSingleGeomTypeMapper
...@@ -76,8 +76,8 @@ public: ...@@ -76,8 +76,8 @@ public:
*/ */
BaseGridGeometry(const GridView& gridView) BaseGridGeometry(const GridView& gridView)
: gridView_(gridView) : gridView_(gridView)
, elementMapper_(gridView, Dune::mcmgElementLayout()) , elementMapper_(makeElementMapper_(gridView))
, vertexMapper_(gridView, Dune::mcmgVertexLayout()) , vertexMapper_(makeVertexMapper_(gridView))
, bBoxMin_(std::numeric_limits<double>::max()) , bBoxMin_(std::numeric_limits<double>::max())
, bBoxMax_(-std::numeric_limits<double>::max()) , bBoxMax_(-std::numeric_limits<double>::max())
{ {
...@@ -191,6 +191,24 @@ public: ...@@ -191,6 +191,24 @@ public:
private: private:
//! Return an instance of the element mapper
ElementMapper makeElementMapper_(const GridView& gridView) const
{
if constexpr (std::is_same_v<ElementMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>)
return ElementMapper(gridView, Dune::mcmgElementLayout());
else
return ElementMapper(gridView);
}
//! Return an instance of the vertex mapper
VertexMapper makeVertexMapper_(const GridView& gridView) const
{
if constexpr (std::is_same_v<VertexMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>)
return VertexMapper(gridView, Dune::mcmgVertexLayout());
else
return VertexMapper(gridView);
}
//! Compute the bouding box of the entire domain, for e.g. setting boundary conditions //! Compute the bouding box of the entire domain, for e.g. setting boundary conditions
void computeGlobalBoundingBox_() void computeGlobalBoundingBox_()
{ {
......
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