discretize.utils.closestPoints

discretize.utils.closestPoints(mesh, pts, gridLoc='CC')[source]

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

Parameters:
  • mesh (BaseMesh) – The mesh
  • pts (numpy.ndarray) – Points to move
  • gridLoc (str) – [‘CC’, ‘N’, ‘Fx’, ‘Fy’, ‘Fz’, ‘Ex’, ‘Ex’, ‘Ey’, ‘Ez’]
Return type:

numpy.ndarray

Returns:

nodeInds

Examples using discretize.utils.closestPoints