Merge pull request #2510 from dr-robertk/PR/bugfix-gridview-mixup

[bugfix][ISTLSolverEbos] fix compilation when dune-fem is used in
This commit is contained in:
Tor Harald Sandve 2020-04-01 10:05:51 +02:00 committed by GitHub
commit 202235abe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ protected:
// Set it up manually
using ElementMapper =
Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
ElementMapper elemMapper(simulator_.vanguard().grid().leafGridView(), Dune::mcmgElementLayout());
ElementMapper elemMapper(simulator_.vanguard().gridView(), Dune::mcmgElementLayout());
detail::findOverlapAndInterior(gridForConn, elemMapper, overlapRows_, interiorRows_);
if (gridForConn.comm().size() > 1) {
@ -807,12 +807,13 @@ protected:
void noGhostAdjacency()
{
const auto& grid = simulator_.vanguard().grid();
const auto& gridView = simulator_.vanguard().gridView();
// 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<GridView>;
ElementMapper elemMapper(simulator_.vanguard().grid().leafGridView(), Dune::mcmgElementLayout());
ElementMapper elemMapper(gridView, Dune::mcmgElementLayout());
typedef typename Matrix::size_type size_type;
size_type numCells = grid.size( 0 );
noGhostMat_.reset(new Matrix(numCells, numCells, Matrix::random));
@ -820,7 +821,6 @@ protected:
std::vector<std::set<size_type>> pattern;
pattern.resize(numCells);
const auto& gridView = grid.leafGridView();
auto elemIt = gridView.template begin<0>();
const auto& elemEndIt = gridView.template end<0>();