Lines Matching refs:dist
319 PetscReal dist = 0; in PetscSquareDistance() local
320 for (PetscInt j = 0; j < dim; j++) dist += PetscSqr(x[j] - y[j]); in PetscSquareDistance()
321 return dist; in PetscSquareDistance()
333 PetscReal dist = PetscSquareDistance(dim, point, &tree->coords[point_index * dim]); in PetscKDTreeQueryLeaf() local
334 if (dist < *distance_sqr) { in PetscKDTreeQueryLeaf()
335 *distance_sqr = dist; in PetscKDTreeQueryLeaf()
351 PetscReal dist = 0.; in PetscKDTreeQueryLeaf_CopyCoords() local
352 …for (PetscInt d = 0; d < dim; d++) dist += PetscSqr(point[d] - tree->coords[leaf.coords_handle + d… in PetscKDTreeQueryLeaf_CopyCoords()
353 if (dist < *distance_sqr) { in PetscKDTreeQueryLeaf_CopyCoords()
354 *distance_sqr = dist; in PetscKDTreeQueryLeaf_CopyCoords()
369 PetscReal dist; in PetscKDTreeQuery_Recurse() local
372 …ds_handle > -1) PetscCall(PetscKDTreeQueryLeaf_CopyCoords(tree, leaf, point, &point_index, &dist)); in PetscKDTreeQuery_Recurse()
373 else PetscCall(PetscKDTreeQueryLeaf(tree, leaf, point, &point_index, &dist)); in PetscKDTreeQuery_Recurse()
374 if (dist < *dist_sqr) { in PetscKDTreeQuery_Recurse()
375 *dist_sqr = dist; in PetscKDTreeQuery_Recurse()