discretize.utils.closest_points_index

discretize.utils.closest_points_index(mesh, pts, grid_loc='CC', **kwargs)[source]

Move a list of points to the closest points on a grid.

Parameters
mesh: BaseMesh

The mesh

pts: numpy.ndarray

Points to move

grid_loc: {‘CC’, ‘N’, ‘Fx’, ‘Fy’, ‘Fz’, ‘Ex’, ‘Ex’, ‘Ey’, ‘Ez’}

Which grid to move points to.

Returns
numpy.ndarray

nodeInds