From 57329f290f52c4c53e86f366efb7fdb7b2508f4f Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 16 May 2013 10:42:25 +0100 Subject: [PATCH] BUG: If point is outside octree need to call getVolumeType explicitly instead of via the octree --- src/meshTools/searchableSurface/triSurfaceMesh.C | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C index 2222981793..21cec14657 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.C +++ b/src/meshTools/searchableSurface/triSurfaceMesh.C @@ -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::perturbTol() = oldTol;