From ec1bf83bcd1498b2ddef550c0b65fc290f5e6cf8 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Tue, 12 Jun 2018 18:52:19 +0200
Subject: [PATCH] [disc] Improve flexibility of default grid geometry traits
 wrt custom mappers

---
 dumux/discretization/box/fvgridgeometry.hh                   | 4 ++--
 dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh     | 4 ++--
 .../staggered/freeflow/fvgridgeometrytraits.hh               | 5 +++--
 dumux/porousmediumflow/boxdfm/fvgridgeometry.hh              | 4 ++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh
index 3736f7781d..1df7688e82 100644
--- a/dumux/discretization/box/fvgridgeometry.hh
+++ b/dumux/discretization/box/fvgridgeometry.hh
@@ -45,9 +45,9 @@ namespace Dumux {
  *        Defines the scv and scvf types and the mapper types
  * \tparam the grid view type
  */
-template<class GridView>
+template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
 struct BoxDefaultGridGeometryTraits
-: public DefaultMapperTraits<GridView>
+: public MapperTraits
 {
     using SubControlVolume = BoxSubControlVolume<GridView>;
     using SubControlVolumeFace = BoxSubControlVolumeFace<GridView>;
diff --git a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh
index bd874db720..9cbf47d78d 100644
--- a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh
+++ b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh
@@ -44,9 +44,9 @@ namespace Dumux {
  *        Defines the scv and scvf types and the mapper types
  * \tparam the grid view type
  */
-template<class GridView>
+template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
 struct CCTpfaDefaultGridGeometryTraits
-: public DefaultMapperTraits<GridView>
+: public MapperTraits
 {
     using SubControlVolume = CCSubControlVolume<GridView>;
     using SubControlVolumeFace = CCTpfaSubControlVolumeFace<GridView>;
diff --git a/dumux/discretization/staggered/freeflow/fvgridgeometrytraits.hh b/dumux/discretization/staggered/freeflow/fvgridgeometrytraits.hh
index 942a2d5fd1..6499c59498 100644
--- a/dumux/discretization/staggered/freeflow/fvgridgeometrytraits.hh
+++ b/dumux/discretization/staggered/freeflow/fvgridgeometrytraits.hh
@@ -40,8 +40,9 @@ namespace Dumux {
  * \ingroup StaggeredDiscretization
  * \brief Default traits for the finite volume grid geometry.
  */
-template<class GridView>
-struct StaggeredFreeFlowDefaultFVGridGeometryTraits : public DefaultMapperTraits<GridView>
+template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
+struct StaggeredFreeFlowDefaultFVGridGeometryTraits
+: public MapperTraits
 {
     using SubControlVolume = CCSubControlVolume<GridView>;
     using SubControlVolumeFace = FreeFlowStaggeredSubControlVolumeFace<GridView>;
diff --git a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
index 908f720e08..a218adac39 100644
--- a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
+++ b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
@@ -49,9 +49,9 @@ namespace Dumux {
  *        Defines the scv and scvf types and the mapper types
  * \tparam the grid view type
  */
-template<class GridView>
+template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
 struct BoxDfmDefaultGridGeometryTraits
-: public DefaultMapperTraits<GridView>
+: public MapperTraits
 {
     using SubControlVolume = BoxDfmSubControlVolume<GridView>;
     using SubControlVolumeFace = BoxDfmSubControlVolumeFace<GridView>;
-- 
GitLab