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,10 +896,27 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()
|
||||
|
||||
pointIndexHit info = tree.findNearest(pt, spanSqr);
|
||||
|
||||
if (info.hit())
|
||||
{
|
||||
vit->alignment() = storedAlignments_[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Info<< nl << "Calculating target cell alignment and size" << endl;
|
||||
|
||||
Reference in New Issue
Block a user