topoMeshCoords

If the topology contains a mesh or torus, return the coordinates of the calling process in that mesh or torus

Synopsis

int topoMeshCoords(topoinfo_t *topo, int *ndim, int meshcoords[], int qtorus[])

Input Parameter

topo
Pointer to topology information

Input/Output Parameter

ndim
Pointer to dimension of mesh or torus. On input, the size of the arrays meshcoords and qtorus. On output, the size of the mesh or torus.

Output Parameters

meshcoords
The coordinates of the calling process in the mesh.
qtorus
1 if this dimension is periodic, 0 otherwise.

Return Value

0 on success (a mesh topology element was found and the data returned). Nonzero (currently 1) on failure, and -1 if the topology does not contain a mesh or torus.

Notes

The current implementation does not indicate whether any particular dimension is periodic, only whether the entire multidimensional mesh is periodic. In addition, a subset of a torus is still returned as a torus even though the min and max coordinates in this dimension are not connected directly together.