Home
last modified time | relevance | path

Searched refs:num_coords (Results 1 – 4 of 4) sorted by relevance

/petsc/src/vec/is/utils/
H A Dkdtree.c28 PetscCount num_coords, num_leaves, num_stems, num_bucket_indices; member
114 PetscCount num_coords = tree->num_coords, range_size = end - start, location; in PetscKDTreeVerifySortedIndices() local
118 PetscCall(PetscArraycpy(temp, &sorted_indices[0 * num_coords + start], range_size)); in PetscKDTreeVerifySortedIndices()
124 PetscCall(PetscFindCount(sorted_indices[d * num_coords + i], range_size, temp, &location)); in PetscKDTreeVerifySortedIndices()
125 …from %" PetscInt_FMT " dimensional index in 0th dimension", sorted_indices[d * num_coords + i], d); in PetscKDTreeVerifySortedIndices()
170 PetscCount num_coords = tree->num_coords; in PetscKDTreeBuildStemAndLeaves() local
184 PetscCall(PetscArraycpy(temp, &sorted_indices[0 * num_coords + start], end - start)); in PetscKDTreeBuildStemAndLeaves()
191 …if (lower < median && PetscKDTreeSortFunc(sorted_indices[d * num_coords + i], median_idx, tree, ax… in PetscKDTreeBuildStemAndLeaves()
192 sorted_indices[(d - 1) * num_coords + (++lower)] = sorted_indices[d * num_coords + i]; in PetscKDTreeBuildStemAndLeaves()
194 sorted_indices[(d - 1) * num_coords + (++upper)] = sorted_indices[d * num_coords + i]; in PetscKDTreeBuildStemAndLeaves()
[all …]
/petsc/src/vec/is/utils/tests/
H A Dex1.c15 PetscInt num_coords, dim, num_rand_points = 0, bucket_size = PETSC_DECIDE; in main() local
29 …PetscCall(PetscOptionsInt("-num_coords", "Number of coordinates", "", PETSC_FALSE, &num_coords, NU… in main()
42 coords_size = num_coords * dim; in main()
49 PetscCall(PetscKDTreeCreate(num_coords, dim, coords, copy_mode, bucket_size, &tree)); in main()
56 num_points_queried += num_coords; in main()
58 PetscCall(PetscMalloc2(num_coords, &indices, num_coords, &distances)); in main()
59 …PetscCall(PetscKDTreeQueryPointsNearestNeighbor(tree, num_coords, coords, PETSC_MACHINE_EPSILON * … in main()
60 for (PetscInt i = 0; i < num_coords; i++) { in main()
81 for (PetscInt j = 0; j < num_coords; j++) { in main()
/petsc/src/dm/impls/plex/tests/
H A Dex103.c177 PetscInt coords_size, num_coords; in DMPlexGetPointsCentroids() local
180 num_coords = coords_size / coords_dim; in DMPlexGetPointsCentroids()
181 for (PetscInt c = 0; c < num_coords; c++) { in DMPlexGetPointsCentroids()
184 for (PetscInt d = 0; d < coords_dim; d++) points_centroids_[p * coords_dim + d] /= num_coords; in DMPlexGetPointsCentroids()
/petsc/src/dm/impls/plex/
H A Dplexcreate.c1165 PetscInt face = donor_faces[f], num_coords; in DMPlexSetBoxLabel_Internal() local
1167 num_coords = coords_size / dim; in DMPlexSetBoxLabel_Internal()
1168 for (PetscInt c = 0; c < num_coords; c++) { in DMPlexSetBoxLabel_Internal()
1173 …onor_centroids[f * centroid_comps + comp_index] += PetscRealPart(coords[c * dim + i]) / num_coords; in DMPlexSetBoxLabel_Internal()
1181 PetscInt face = periodic_faces[f], num_coords; in DMPlexSetBoxLabel_Internal() local
1183 num_coords = coords_size / dim; in DMPlexSetBoxLabel_Internal()
1184 for (PetscInt c = 0; c < num_coords; c++) { in DMPlexSetBoxLabel_Internal()
1189 …odic_centroids[f * centroid_comps + comp_index] += PetscRealPart(coords[c * dim + i]) / num_coords; in DMPlexSetBoxLabel_Internal()