diff --git a/dune/grid/uggrid.hh b/dune/grid/uggrid.hh index 67a414f93eb7f7b2d1a8e2250e8127b0101e90d3..1cb82ab7e9d3404ebdd2fd336f2f6dfacf4c9786 100644 --- a/dune/grid/uggrid.hh +++ b/dune/grid/uggrid.hh @@ -487,7 +487,8 @@ namespace Dune { { #ifdef ModelP // gather element data - // UGLBGatherScatter::template gather<0>(this->leafGridView(), dataHandle); + if (dataHandle.contains(dim, 0)) + UGLBGatherScatter::template gather<0>(this->leafGridView(), dataHandle); // gather node data if (dataHandle.contains(dim,dim)) @@ -500,7 +501,8 @@ namespace Dune { #ifdef ModelP // scatter element data - // UGLBGatherScatter::template scatter<0>(this->leafGridView(), dataHandle); + if (dataHandle.contains(dim, 0)) + UGLBGatherScatter::template scatter<0>(this->leafGridView(), dataHandle); // scatter node data if (dataHandle.contains(dim,dim))