mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: refinementFeatures: avoid searching on empty trees
This commit is contained in:
@ -129,7 +129,8 @@ Foam::refinementFeatures::refinementFeatures
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Detected " << featurePoints.size()
|
Info<< "Detected " << featurePoints.size()
|
||||||
<< " featurePoints out of " << points.size() << endl;
|
<< " featurePoints out of " << points.size()
|
||||||
|
<< " on feature " << eMesh.name() << endl;
|
||||||
|
|
||||||
pointTrees_.set
|
pointTrees_.set
|
||||||
(
|
(
|
||||||
@ -164,6 +165,9 @@ void Foam::refinementFeatures::findNearestEdge
|
|||||||
forAll(edgeTrees_, featI)
|
forAll(edgeTrees_, featI)
|
||||||
{
|
{
|
||||||
const indexedOctree<treeDataEdge>& tree = edgeTrees_[featI];
|
const indexedOctree<treeDataEdge>& tree = edgeTrees_[featI];
|
||||||
|
|
||||||
|
if (tree.shapes().size() > 0)
|
||||||
|
{
|
||||||
forAll(samples, sampleI)
|
forAll(samples, sampleI)
|
||||||
{
|
{
|
||||||
const point& sample = samples[sampleI];
|
const point& sample = samples[sampleI];
|
||||||
@ -188,6 +192,7 @@ void Foam::refinementFeatures::findNearestEdge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::refinementFeatures::findNearestPoint
|
void Foam::refinementFeatures::findNearestPoint
|
||||||
@ -206,6 +211,9 @@ void Foam::refinementFeatures::findNearestPoint
|
|||||||
forAll(pointTrees_, featI)
|
forAll(pointTrees_, featI)
|
||||||
{
|
{
|
||||||
const indexedOctree<treeDataPoint>& tree = pointTrees_[featI];
|
const indexedOctree<treeDataPoint>& tree = pointTrees_[featI];
|
||||||
|
|
||||||
|
if (tree.shapes().pointLabels().size() > 0)
|
||||||
|
{
|
||||||
forAll(samples, sampleI)
|
forAll(samples, sampleI)
|
||||||
{
|
{
|
||||||
const point& sample = samples[sampleI];
|
const point& sample = samples[sampleI];
|
||||||
@ -237,6 +245,7 @@ void Foam::refinementFeatures::findNearestPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user