Lines Matching +full:petsc +full:- +full:dist
3 #include <petsc.h>
7 PetscReal dist = 0; in Distance() local
8 for (PetscInt j = 0; j < dim; j++) dist += PetscSqr(x[j] - y[j]); in Distance()
9 return PetscSqrtReal(dist); in Distance()
25 PetscCall(PetscLogDefaultBegin()); // So we can use PetscLogEventGetPerfInfo without -log_view in main()
29 …PetscCall(PetscOptionsInt("-num_coords", "Number of coordinates", "", PETSC_FALSE, &num_coords, NU… in main()
30 PetscCall(PetscOptionsInt("-dim", "Dimension of the coordinates", "", PETSC_FALSE, &dim, NULL)); in main()
31 …PetscCall(PetscOptionsInt("-bucket_size", "Size of the bucket at each leaf", "", bucket_size, &buc… in main()
32 …PetscCall(PetscOptionsBoundedInt("-loops", "Number of times to loop through KDTree creation and qu… in main()
33 …PetscCall(PetscOptionsEnum("-copy_mode", "Copy mode to use with KDTree", "PetscKDTreeCreate", Pets… in main()
34 PetscCall(PetscOptionsBool("-view_tree", "View the KDTree", "", view_tree, &view_tree, NULL)); in main()
35 …PetscCall(PetscOptionsBool("-view_performance", "View the performance speed of the KDTree", "", vi… in main()
36 …PetscCall(PetscOptionsBool("-test_tree_points", "Test querying tree points against itself", "", te… in main()
37 …PetscCall(PetscOptionsBool("-test_rand_points", "Test querying random points via brute force", "",… in main()
38 …PetscCall(PetscOptionsBool("-query_rand_points", "Query querying random points", "", query_rand_po… in main()
39 …if (test_rand_points || query_rand_points) PetscCall(PetscOptionsInt("-num_rand_points", "Number o… in main()
80 PetscInt index = -1; in main()
82 PetscReal dist = Distance(dim, rand_point, &coords[dim * j]); in main() local
83 if (dist < nearest_distance) { in main()
84 nearest_distance = dist; in main()
120 …args: -num_coords 35 -test_tree_points -test_rand_points -num_rand_points 300 -bucket_size 13 -vie…
123 args: -dim 1
126 args: -dim 2
129 args: -dim 3
132 args: -dim 3 -num_coords 13
136 …args: -dim 3 -num_coords 350 -test_tree_points -test_rand_points -num_rand_points 300 -view_perfor…
141 args: -copy_mode copy_values
144 args: -copy_mode use_pointer