mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: procesorPolyPatch: fixed check on oppositeness, correct tolerance
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -187,9 +187,11 @@ bool Foam::matchPoints
|
||||
|
||||
// Go through range of equal mag and find nearest vector.
|
||||
scalar minDistSqr = VGREAT;
|
||||
scalar minDistNorm = 0;
|
||||
label minFaceI = -1;
|
||||
|
||||
// Valid candidate points should have opposite normal
|
||||
const scalar minDistNorm = 0;
|
||||
|
||||
for
|
||||
(
|
||||
label j = startI;
|
||||
@ -220,7 +222,6 @@ bool Foam::matchPoints
|
||||
// Check that the normals point in equal and opposite directions
|
||||
if (distNorm < minDistNorm)
|
||||
{
|
||||
minDistNorm = distNorm;
|
||||
minDistSqr = distSqr;
|
||||
minFaceI = faceI;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -913,7 +913,7 @@ bool Foam::processorPolyPatch::order
|
||||
faceMap
|
||||
);
|
||||
|
||||
// Try using face point average for matching
|
||||
// Fallback: try using face point average for matching
|
||||
if (!matchedAll)
|
||||
{
|
||||
const pointField& ppPoints = pp.points();
|
||||
@ -933,16 +933,20 @@ bool Foam::processorPolyPatch::order
|
||||
|
||||
scalarField tols2
|
||||
(
|
||||
calcFaceTol(pp, pp.points(), facePointAverages)
|
||||
matchTolerance()
|
||||
*calcFaceTol(pp, pp.points(), facePointAverages)
|
||||
);
|
||||
|
||||
// Note that we do not use the faceNormals anymore for
|
||||
// comparison. Since we're
|
||||
// having problems with the face centres (e.g. due to extreme
|
||||
// aspect ratios) we will probably also have problems with
|
||||
// reliable normals calculation
|
||||
labelList faceMap2(faceMap.size(), -1);
|
||||
matchedAll = matchPoints
|
||||
(
|
||||
facePointAverages,
|
||||
masterFacePointAverages,
|
||||
pp.faceNormals(),
|
||||
masterNormals,
|
||||
tols2,
|
||||
true,
|
||||
faceMap2
|
||||
|
||||
Reference in New Issue
Block a user