BUG: snappyHexMesh: calculate surface normals if face splitting. Fixes #522.

This commit is contained in:
mattijs
2017-07-12 10:58:21 +01:00
parent 2183907afe
commit 0a65b142cf

View File

@ -2750,13 +2750,13 @@ void Foam::snappySnapDriver::doSnap
motionSmoother& meshMover = meshMoverPtr(); motionSmoother& meshMover = meshMoverPtr();
// Calculate displacement at every patch point. Insert into // Calculate displacement at every patch point if we need it:
// meshMover. // - if automatic near-surface detection
// Calculate displacement at every patch point // - if face splitting active
pointField nearestPoint; pointField nearestPoint;
vectorField nearestNormal; vectorField nearestNormal;
if (snapParams.detectNearSurfacesSnap()) if (snapParams.detectNearSurfacesSnap() || doSplit)
{ {
nearestPoint.setSize(pp.nPoints(), vector::max); nearestPoint.setSize(pp.nPoints(), vector::max);
nearestNormal.setSize(pp.nPoints(), Zero); nearestNormal.setSize(pp.nPoints(), Zero);