Lines Matching refs:coords
29 const PetscReal *coords, *coords_owned; // Only free owned on Destroy member
93 const PetscReal *coords = tree->coords; in PetscKDTreeSortFunc() local
97 PetscReal diff = coords[left * dim + axis] - coords[right * dim + axis]; in PetscKDTreeSortFunc()
165 …for (PetscInt d = 0; d < dim; d++) bucket_coords[d * leaf->count + i] = tree->coords[bucket_indice… in PetscKDTreeBuildStemAndLeaves()
183 …stem->split = (tree->coords[tree->dim * median_idx + axis] + tree->coords[tree->dim * medianp1_idx… in PetscKDTreeBuildStemAndLeaves()
236 PetscErrorCode PetscKDTreeCreate(PetscCount num_coords, PetscInt dim, const PetscReal coords[], Pet… in PetscKDTreeCreate() argument
250 PetscAssertPointer(coords, 3); in PetscKDTreeCreate()
259 tree->coords_owned = coords; // fallthrough in PetscKDTreeCreate()
261 tree->coords = coords; in PetscKDTreeCreate()
265 PetscCall(PetscArraycpy((PetscReal *)tree->coords_owned, coords, num_coords * dim)); in PetscKDTreeCreate()
266 tree->coords = tree->coords_owned; in PetscKDTreeCreate()
304 tree->coords = tree->coords_owned; in PetscKDTreeCreate()
333 PetscReal dist = PetscSquareDistance(dim, point, &tree->coords[point_index * dim]); in PetscKDTreeQueryLeaf()
352 …for (PetscInt d = 0; d < dim; d++) dist += PetscSqr(point[d] - tree->coords[leaf.coords_handle + d… in PetscKDTreeQueryLeaf_CopyCoords()
500 …>dim; k++) PetscCall(PetscViewerASCIIPrintf(viewer, "%g ", (double)tree->coords[leaf.coords_handle… in PetscKDTreeView()
503 …>dim; k++) PetscCall(PetscViewerASCIIPrintf(viewer, "%g ", (double)tree->coords[bucket_index * tre… in PetscKDTreeView()