mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: meshSearch : extraneous loop
This commit is contained in:
@ -617,30 +617,25 @@ bool Foam::meshSearch::pointInCell(const point& p, label cellI) const
|
|||||||
{
|
{
|
||||||
label faceI = cFaces[i];
|
label faceI = cFaces[i];
|
||||||
|
|
||||||
const face& f = mesh_.faces()[faceI];
|
pointHit inter = mesh_.faces()[faceI].ray
|
||||||
|
(
|
||||||
|
ctr,
|
||||||
|
dir,
|
||||||
|
mesh_.points(),
|
||||||
|
intersection::HALF_RAY,
|
||||||
|
intersection::VECTOR
|
||||||
|
);
|
||||||
|
|
||||||
forAll(f, fp)
|
if (inter.hit())
|
||||||
{
|
{
|
||||||
pointHit inter = f.ray
|
scalar dist = inter.distance();
|
||||||
(
|
|
||||||
ctr,
|
|
||||||
dir,
|
|
||||||
mesh_.points(),
|
|
||||||
intersection::HALF_RAY,
|
|
||||||
intersection::VECTOR
|
|
||||||
);
|
|
||||||
|
|
||||||
if (inter.hit())
|
if (dist < magDir)
|
||||||
{
|
{
|
||||||
scalar dist = inter.distance();
|
// Valid hit. Hit face so point is not in cell.
|
||||||
|
intersection::setPlanarTol(oldTol);
|
||||||
|
|
||||||
if (dist < magDir)
|
return false;
|
||||||
{
|
|
||||||
// Valid hit. Hit face so point is not in cell.
|
|
||||||
intersection::setPlanarTol(oldTol);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user