Searched refs:distances (Results 1 – 4 of 4) sorted by relevance
| /petsc/src/vec/is/utils/tests/ |
| H A D | ex1.c | 55 PetscReal *distances; in main() local 58 PetscCall(PetscMalloc2(num_coords, &indices, num_coords, &distances)); in main() 59 …yPointsNearestNeighbor(tree, num_coords, coords, PETSC_MACHINE_EPSILON * 1e3, indices, distances)); in main() 61 …uery returned index %" PetscCount_FMT " with distance %g\n", i, indices[i], (double)distances[i])); in main() 63 PetscCall(PetscFree2(indices, distances)); in main() 68 PetscReal *distances; in main() local 73 …cMalloc3(rand_queries_size, &rand_points, num_rand_points, &indices, num_rand_points, &distances)); in main() 75 …PetscKDTreeQueryPointsNearestNeighbor(tree, num_rand_points, rand_points, 0., indices, distances)); in main() 89 …%" PetscInt_FMT " with distance %g is closer\n", i, indices[i], (double)distances[i], index, (doub… in main() 92 PetscCall(PetscFree3(rand_points, indices, distances)); in main()
|
| /petsc/src/vec/is/sf/utils/ |
| H A D | sfcoord.c | 187 PetscReal *distances; in PetscSFSetGraphFromCoordinates() local 190 PetscCall(PetscMalloc2(nleaves, &indices, nleaves, &distances)); in PetscSFSetGraphFromCoordinates() 191 …tscCall(PetscKDTreeQueryPointsNearestNeighbor(tree, nleaves, leafcoords, tol, indices, distances)); in PetscSFSetGraphFromCoordinates() 193 if (distances[i] < tol) { in PetscSFSetGraphFromCoordinates() 206 PetscCall(PetscFree2(indices, distances)); in PetscSFSetGraphFromCoordinates()
|
| /petsc/src/vec/is/utils/ |
| H A D | kdtree.c | 427 …points, const PetscReal points[], PetscReal tolerance, PetscCount indices[], PetscReal distances[]) in PetscKDTreeQueryPointsNearestNeighbor() argument 439 PetscAssertPointer(distances, 6); in PetscKDTreeQueryPointsNearestNeighbor() 444 distances[p] = PETSC_MAX_REAL; in PetscKDTreeQueryPointsNearestNeighbor() 446 …t_handle, (char)tree->is_root_leaf, offsets, rd, PetscSqr(tolerance), &indices[p], &distances[p])); in PetscKDTreeQueryPointsNearestNeighbor() 447 distances[p] = PetscSqrtReal(distances[p]); in PetscKDTreeQueryPointsNearestNeighbor()
|
| /petsc/doc/manual/ |
| H A D | dmplex.md | 710 A metric must be symmetric positive-definite, so that distances may be properly
|