mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Graceful handling of octree find nearest failures.
This commit is contained in:
@ -896,9 +896,26 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()
|
|||||||
|
|
||||||
pointIndexHit info = tree.findNearest(pt, spanSqr);
|
pointIndexHit info = tree.findNearest(pt, spanSqr);
|
||||||
|
|
||||||
vit->alignment() = storedAlignments_[info.index()];
|
if (info.hit())
|
||||||
|
{
|
||||||
|
vit->alignment() = storedAlignments_[info.index()];
|
||||||
|
|
||||||
vit->targetCellSize() = storedSizes_[info.index()];
|
vit->targetCellSize() = storedSizes_[info.index()];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WarningIn
|
||||||
|
(
|
||||||
|
"void "
|
||||||
|
"Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()"
|
||||||
|
)
|
||||||
|
<< "Point " << pt << " did not find a nearest point "
|
||||||
|
<< " for alignment and size lookup." << endl;
|
||||||
|
|
||||||
|
vit->alignment() = requiredAlignment(pt);
|
||||||
|
|
||||||
|
vit->targetCellSize() = cellSizeControl().cellSize(pt, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user