Commit b68e22d5 authored by Andrew Bauer's avatar Andrew Bauer Committed by Kitware Robot
Browse files

Merge topic 'ghostcellsgenerator_tolerance' into paraview/release

875b76f1

 Making the tolerance larger for coincident points

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4135
parents 35de4075 875b76f1
......@@ -790,7 +790,7 @@ void vtkPUnstructuredGridGhostCellsGenerator::ComputeSharedPoints()
kdtree->BuildLocatorFromPoints(points);
double bounds[6];
kdtree->GetBounds(bounds);
double tolerance = 1.e-10*sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0])+
double tolerance = 1.e-6*sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0])+
(bounds[3]-bounds[2])*(bounds[3]-bounds[2])+
(bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
......@@ -803,11 +803,11 @@ void vtkPUnstructuredGridGhostCellsGenerator::ComputeSharedPoints()
continue;
}
std::vector<double>& offProcSurfacePoints = iter->second;
double dist(0);
double dist2(0); // result will be distance squared
for (size_t i=0;i<offProcSurfacePoints.size();i+=3)
{
vtkIdType id = kdtree->FindClosestPointWithinRadius(
tolerance, &offProcSurfacePoints[i], dist);
tolerance, &offProcSurfacePoints[i], dist2);
if (id != -1)
{ // matching point...
vtkIdType inputId = this->Internals->LocalPointsMap->GetValue(id);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment