Skip to content
Snippets Groups Projects
Commit 628c5b82 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Only restrict obstacles for dofs that have an obstacle

parent 1c75a3b2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment