BUG: If point is outside octree need to call getVolumeType explicitly

instead of via the octree
This commit is contained in:
laurence
2013-05-16 10:42:25 +01:00
parent c0eb9d678f
commit 57329f290f

View File

@ -738,9 +738,19 @@ void Foam::triSurfaceMesh::getVolumeType
{
const point& pt = points[pointI];
// - use cached volume type per each tree node
// - cheat conversion since same values
volType[pointI] = tree().getVolumeType(pt);
if (!tree().bb().contains(pt))
{
// Have to calculate directly as outside the octree
volType[pointI] = tree().shapes().getVolumeType(tree(), pt);
}
else
{
// - use cached volume type per each tree node
volType[pointI] = tree().getVolumeType(pt);
}
// Info<< "octree : " << pt << " = "
// << volumeType::names[volType[pointI]] << endl;
}
indexedOctree<treeDataTriSurface>::perturbTol() = oldTol;