From 3284153e7735a296ad1c6f2306381998a94fb2da Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 13 Mar 2020 09:05:03 +0000 Subject: [PATCH] cyclicTransform: Corrected length scale check for closed patches --- .../polyPatches/constraint/cyclic/cyclicTransform.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.C index 693a75cebd..3ccbfdd322 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.C @@ -354,15 +354,15 @@ Foam::cyclicTransform::cyclicTransform const vector area = sum(areas); const vector nbrArea = sum(nbrAreas); - // Calculate patch length scales - const scalar lengthScale = sqrt(mag(area)); - // Calculate the centroids for the supplied patch data const scalarField magAreas(mag(areas)); const scalarField magNbrAreas(mag(nbrAreas)); const point ctr = sum(ctrs*magAreas)/sum(magAreas); const point nbrCtr = sum(nbrCtrs*magNbrAreas)/sum(magNbrAreas); + // Calculate patch length scales + const scalar lengthScale = sqrt(sum(magAreas)); + // Calculate the transformation from the patch geometry if (!transformComplete_) {