mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Add a diff function to triad and a tolerance to edgeDirections
This commit is contained in:
@ -136,7 +136,7 @@ Foam::pointField Foam::coupledPolyPatch::getAnchorPoints
|
|||||||
{
|
{
|
||||||
pointField anchors(faces.size());
|
pointField anchors(faces.size());
|
||||||
|
|
||||||
if (transform == COINCIDENTFULLMATCH)
|
if (transform != COINCIDENTFULLMATCH)
|
||||||
{
|
{
|
||||||
// Return the first point
|
// Return the first point
|
||||||
forAll(faces, faceI)
|
forAll(faces, faceI)
|
||||||
|
|||||||
@ -393,7 +393,8 @@ Foam::scalar Foam::diff(const triad& A, const triad& B)
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalar cosPhi =
|
scalar cosPhi =
|
||||||
(tmpA[dir] & tmpB[dir])/(mag(tmpA[dir])*mag(tmpA[dir]) + SMALL);
|
(tmpA[dir] & tmpB[dir])
|
||||||
|
/(mag(tmpA[dir])*mag(tmpA[dir]) + SMALL);
|
||||||
|
|
||||||
cosPhi = min(max(cosPhi, -1), 1);
|
cosPhi = min(max(cosPhi, -1), 1);
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(const IOobject& io)
|
|||||||
edgeDirections_[eI] = eds[eI].vec(pts);
|
edgeDirections_[eI] = eds[eI].vec(pts);
|
||||||
}
|
}
|
||||||
|
|
||||||
edgeDirections_ /= mag(edgeDirections_);
|
edgeDirections_ /= (mag(edgeDirections_) + SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection
|
|||||||
dir,
|
dir,
|
||||||
faceCentres[index],
|
faceCentres[index],
|
||||||
points,
|
points,
|
||||||
intersection::HALF_RAY
|
intersection::HALF_RAY,
|
||||||
|
shape.planarTol_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user