From 5fe55d41058df70480545d53e1bc76de7e06939e Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 12 Jun 2018 19:39:19 +0200 Subject: [PATCH] [test] Use reordering dof mapper in 1p 1d3d tube test --- .../1p/implicit/tubesproblem.hh | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/porousmediumflow/1p/implicit/tubesproblem.hh b/test/porousmediumflow/1p/implicit/tubesproblem.hh index 7a25c350d0..b3832cdf29 100644 --- a/test/porousmediumflow/1p/implicit/tubesproblem.hh +++ b/test/porousmediumflow/1p/implicit/tubesproblem.hh @@ -32,6 +32,7 @@ #include <dune/foamgrid/foamgrid.hh> #endif +#include <dumux/common/reorderingdofmapper.hh> #include <dumux/discretization/cellcentered/tpfa/properties.hh> #include <dumux/discretization/box/properties.hh> #include <dumux/discretization/methods.hh> @@ -59,6 +60,35 @@ NEW_TYPE_TAG(TubesTestBoxTypeTag, INHERITS_FROM(BoxModel, TubesTestTypeTag)); SET_TYPE_PROP(TubesTestTypeTag, Grid, Dune::FoamGrid<1, 3>); #endif +// if we have pt scotch use the reordering dof mapper to optimally sort the dofs (cc) +SET_PROP(TubesTestCCTpfaTypeTag, FVGridGeometry) +{ +private: + static constexpr bool enableCache = GET_PROP_VALUE(TypeTag, EnableFVGridGeometryCache); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + + using ElementMapper = ReorderingDofMapper<GridView>; + using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; + using MapperTraits = DefaultMapperTraits<GridView, ElementMapper, VertexMapper>; +public: + using type = CCTpfaFVGridGeometry<GridView, enableCache, CCTpfaDefaultGridGeometryTraits<GridView, MapperTraits>>; +}; + +// if we have pt scotch use the reordering dof mapper to optimally sort the dofs (box) +SET_PROP(TubesTestBoxTypeTag, FVGridGeometry) +{ +private: + static constexpr bool enableCache = GET_PROP_VALUE(TypeTag, EnableFVGridGeometryCache); + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + + using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; + using VertexMapper = ReorderingDofMapper<GridView>; + using MapperTraits = DefaultMapperTraits<GridView, ElementMapper, VertexMapper>; +public: + using type = BoxFVGridGeometry<Scalar, GridView, enableCache, BoxDefaultGridGeometryTraits<GridView, MapperTraits>>; +}; + // Set the problem property SET_TYPE_PROP(TubesTestTypeTag, Problem, TubesTestProblem<TypeTag>); -- GitLab