#include "petscdmplex.h" #include "petscfe.h" PetscErrorCode DMPlexFindVertices(DM dm, Vec coordinates, PetscReal eps, IS *points)Not Collective (provided DMGetCoordinatesLocalSetUp() has been called already)
dm | - The DMPlex object | |
coordinates | - The Vec of coordinates of the sought points | |
eps | - The tolerance or PETSC_DEFAULT |
points | - The IS of found DAG points or -1 |
The output IS is living on PETSC_COMM_SELF and its length is npoints. Each rank does the search independently. If this rank's local DMPlex portion contains the DAG point corresponding to the i-th tuple of coordinates, the i-th entry of the output IS is set to that DAG point, otherwise to -1.
The output IS must be destroyed by user.
The tolerance is interpreted as the maximum Euclidean (L2) distance of the sought point from the specified coordinates.
Complexity of this function is currently O(mn) with m number of vertices to find and n number of vertices in the local mesh. This could probably be improved if needed.