From 39a8a088c014ffbffad14b02aaee3d6ef3dffc28 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 17 Dec 2013 10:53:19 +0000 Subject: [PATCH] ENH: symmetryPolyPatch: handle zero faces case --- .../symmetryPlane/symmetryPlanePolyPatch.C | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C index 49b48f8df7..5061538f4c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C @@ -114,17 +114,26 @@ const Foam::vector& Foam::symmetryPlanePolyPatch::n() const // as the average face-normal if (magSqr(n_) < 0.5) { - const vectorField& nf(faceNormals()); - n_ = gAverage(nf); - - // Check the symmetry plane is planar - forAll(nf, facei) + if (returnReduce(size(), sumOp