MeshGetNearestNode

This function returns the node nearest to the given point, or -1 if the closest node is not contained in the local mesh.

Synopsis

#include "mesh.h" 
int MeshGetNearestNode(Mesh mesh, double x, double y, double z, PetscTruth outside, int *node)
Not collective

Input Parameters

mesh - The mesh
x,y,z - The node coordinates
outside - A flag to allow points outside the domain

Output Parameter

node -The nearest node

Note

The outside flag allows points outside the domain to be tested. If this flag is PETSC_FALSE, and (x,y,z) does not lie in the global domain, then an error will result.

Keywords

mesh, node, point location

See Also

MeshLocatePoint()

Level:beginner
Location:
src/mesh/interface/meshQuery.c
Index of all Mesh routines
Table of Contents for all manual pages
Index of all manual pages