mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: distinguish between face areaNormal/unitNormal in the code
This commit is contained in:
@ -92,9 +92,9 @@ Foam::label Foam::oldCyclicPolyPatch::findMaxArea
|
||||
|
||||
forAll(faces, facei)
|
||||
{
|
||||
scalar areaSqr = magSqr(faces[facei].normal(points));
|
||||
scalar areaSqr = magSqr(faces[facei].areaNormal(points));
|
||||
|
||||
if (areaSqr > maxAreaSqr)
|
||||
if (maxAreaSqr < areaSqr)
|
||||
{
|
||||
maxAreaSqr = areaSqr;
|
||||
maxI = facei;
|
||||
@ -359,12 +359,10 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
|
||||
// Determine the face with max area on both halves. These
|
||||
// two faces are used to determine the transformation tensors
|
||||
label max0I = findMaxArea(pp.points(), half0Faces);
|
||||
vector n0 = half0Faces[max0I].normal(pp.points());
|
||||
n0 /= mag(n0) + VSMALL;
|
||||
const vector n0 = half0Faces[max0I].unitNormal(pp.points());
|
||||
|
||||
label max1I = findMaxArea(pp.points(), half1Faces);
|
||||
vector n1 = half1Faces[max1I].normal(pp.points());
|
||||
n1 /= mag(n1) + VSMALL;
|
||||
const vector n1 = half1Faces[max1I].unitNormal(pp.points());
|
||||
|
||||
if (mag(n0 & n1) < 1-matchTolerance())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user