diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index d86c613da..4d4c19b9b 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -90,6 +90,7 @@ namespace Opm using FlexibleSolverType = Dune::FlexibleSolver; using AbstractOperatorType = Dune::AssembledLinearOperator; using WellModelOperator = WellModelAsLinearOperator; + using ElementMapper = GetPropType; #if HAVE_CUDA || HAVE_OPENCL static const unsigned int block_size = Matrix::block_type::rows; @@ -152,9 +153,7 @@ namespace Opm // For some reason simulator_.model().elementMapper() is not initialized at this stage // Hence const auto& elemMapper = simulator_.model().elementMapper(); does not work. // Set it up manually - using ElementMapper = - Dune::MultipleCodimMultipleGeomTypeMapper; - ElementMapper elemMapper(simulator_.vanguard().grid().leafGridView(), Dune::mcmgElementLayout()); + ElementMapper elemMapper(simulator_.vanguard().gridView(), Dune::mcmgElementLayout()); detail::findOverlapAndInterior(simulator_.vanguard().grid(), elemMapper, overlapRows_, interiorRows_); useWellConn_ = EWOMS_GET_PARAM(TypeTag, bool, MatrixAddWellContributions);