MeshGetBoundaryNext

Retrieves the canonical node number of the next node on the specified boundary, with -1 indicating boundary termination.

Synopsis

#include "mesh.h" 
int MeshGetBoundaryNext(Mesh mesh, int boundary, PetscTruth ghost, int *node)
Not collective

Input Parameters

mesh - The mesh
boundary - The boundary marker
ghost - Flag for including ghost nodes

Output Parameter

node -The canonical node number

Note

This is typically used as an iteration construct with MeshGetBoundaryStart(),
for example:

MeshGetBoundaryStart(mesh, OUTER_BD, &node, PETSC_FALSE);
while (node >= 0) {
  PetscPrintf(PETSC_COMM_SELF, "I have boundary node %d\n", node);
  MeshGetBoundaryNext(mesh, OUTER_BD, &node, PETSC_FALSE);
}

Also, this only returns nodes which lie in the given domain, thus the above loop would run in parallel on all processors, returning different nodes on each.

Keywords

mesh, boundary, iterator

See Also

MeshGetBoundaryStart()

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