mappedPatchBase: Fix for patches with a single face
Resolves bug report https://bugs.openfoam.org/view.php?id=4152 Patch contributed by Timo Niemi, VTT.
This commit is contained in:
@ -168,6 +168,19 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
allNearest[alli].data = Foam::sqr(great);
|
||||
}
|
||||
}
|
||||
else if (nbrPolyPatch().size() == 1)
|
||||
{
|
||||
const pointField nbrPoints(nbrPatchFaceCentres());
|
||||
|
||||
forAll(allPoints, alli)
|
||||
{
|
||||
const point& p = allPoints[alli];
|
||||
|
||||
allNearest[alli].proci = Pstream::myProcNo();
|
||||
allNearest[alli].elementi = 0;
|
||||
allNearest[alli].data = magSqr(nbrPoints[0] - p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const pointField nbrPoints(nbrPatchFaceCentres());
|
||||
|
||||
Reference in New Issue
Block a user