petsc-main 2021-04-20
Report Typos and Errors


Try to find DAG points based on their coordinates.


#include "petscdmplex.h"   
#include "petscfe.h"       
PetscErrorCode DMPlexFindVertices(DM dm, PetscInt npoints, const PetscReal coord[], PetscReal eps, PetscInt dagPoints[])
Not Collective (provided DMGetCoordinatesLocalSetUp() has been called already)

Input Parameters

dm - The DMPlex object
npoints - The number of sought points
coords - The array of coordinates of the sought points
eps - The tolerance or PETSC_DEFAULT

Output Parameters

dagPoints - The array of found DAG points, or -1 if not found


The length of the array coords must be npoints * dim where dim is the spatial dimension returned by DMGetDimension().

The output array dagPoints is NOT newly allocated; the user must pass an array of length npoints.

Each rank does the search independently; a nonnegative value is returned only if this rank's local DMPlex portion contains the point.

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.

See Also

DMPlexCreate(), DMGetCoordinatesLocal()




Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages