diff --git a/dune/solvers/transferoperators/mandelobsrestrictor.cc b/dune/solvers/transferoperators/mandelobsrestrictor.cc index b30c278d6114ad8f072594401e93327cd9b27676..69aebce58dee0121f85348234802eeedc9991f1b 100644 --- a/dune/solvers/transferoperators/mandelobsrestrictor.cc +++ b/dune/solvers/transferoperators/mandelobsrestrictor.cc @@ -30,6 +30,9 @@ restrict(const std::vector<BoxConstraint<typename DiscFuncType::field_type,block // Loop over all coarse grid dofs for (size_t i=0; i<transferMat.N(); i++) { + if (fHasObstacle[i].none()) + continue; + const RowType& row = transferMat[i]; ColumnIterator cIt = row.begin(); @@ -37,6 +40,9 @@ restrict(const std::vector<BoxConstraint<typename DiscFuncType::field_type,block // Loop over all fine grid base functions in the support of tObsIt for(; cIt!=cEndIt; ++cIt) { + + if (tHasObstacle[cIt.index()].none()) + continue; // Sort out spurious entries due to numerical dirt if ((*cIt)[0][0] < 1e-3)