BUG: snappyHexMesh: fixes #1836.

When truncating layers in one go (nBufferCellsNoExtrude -1) it
should set the nCells per face to be the min of the number of points
per edge.
This commit is contained in:
mattijs
2020-09-10 13:38:59 +01:00
parent c9ab12cb3d
commit ab55157358

View File

@ -2407,10 +2407,21 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
forAll(f, fp)
{
if (patchNLayers[f[fp]] > 0)
const label nPointLayers = patchNLayers[f[fp]];
if (nPointLayers > 0)
{
nPatchFaceLayers[patchFacei] = patchNLayers[f[fp]];
break;
if (nPatchFaceLayers[patchFacei] == -1)
{
nPatchFaceLayers[patchFacei] = nPointLayers;
}
else
{
nPatchFaceLayers[patchFacei] = min
(
nPatchFaceLayers[patchFacei],
nPointLayers
);
}
}
}
}