process id in DA

Barry Smith bsmith at mcs.anl.gov
Wed Nov 12 19:15:22 CST 2008


   Doesn't look like it: but from the formula

  rank = i + j*Mp + k*Mp*Np

  i = rank % Mp

  k = rank/(Mp*Np)

  j = (rank  - k*Mp*Np)/Mp

  Barry

Or something similar.

Mp, Np are the number of processes in the x and y directions

On Nov 12, 2008, at 6:24 PM, Shao-Ching Huang wrote:

> Hi,
>
> Is there a PETSc call to obtain the "process coordinates" in a process
> grid, partitioned by a DA? (Something like what MPI_Cart_coords does.)
>
> Thanks,
>
> Shao-Ching
>




More information about the petsc-users mailing list