fix boundary face index in parallel

This commit is contained in:
Tor Harald Sandve 2021-02-09 12:35:05 +01:00
parent 2f4131232c
commit 02b978b523
2 changed files with 5 additions and 2 deletions

View File

@ -83,7 +83,7 @@ public:
++intersectionIt_; ++intersectionIt_;
// iterate to the next boundary intersection // iterate to the next boundary intersection
while (intersectionIt_ != iend && !intersectionIt_->boundary()) { while (intersectionIt_ != iend && intersectionIt_->neighbor()) {
++intersectionIt_; ++intersectionIt_;
} }
} }

View File

@ -426,7 +426,7 @@ protected:
BoundaryContext boundaryCtx(elemCtx); BoundaryContext boundaryCtx(elemCtx);
// move the iterator to the first boundary // move the iterator to the first boundary
if(!boundaryCtx.intersection(0).boundary()) if(boundaryCtx.intersection(0).neighbor())
boundaryCtx.increment(); boundaryCtx.increment();
// evaluate the boundary for all boundary faces of the current context // evaluate the boundary for all boundary faces of the current context
@ -434,6 +434,9 @@ protected:
for (unsigned faceIdx = 0; faceIdx < numBoundaryFaces; ++faceIdx, boundaryCtx.increment()) { for (unsigned faceIdx = 0; faceIdx < numBoundaryFaces; ++faceIdx, boundaryCtx.increment()) {
// add the residual of all vertices of the boundary // add the residual of all vertices of the boundary
// segment // segment
if(!boundaryCtx.intersection(faceIdx).boundary())
continue;
evalBoundarySegment_(residual, evalBoundarySegment_(residual,
boundaryCtx, boundaryCtx,
faceIdx, faceIdx,