The vertices of rank nrank (0-based) when n_vert vertices are split over nproc ranks, and their offset, as 2decomp splits them. The cells are split as evenly as possible, the last mod(n_cell, nproc) ranks taking one more, and a non-periodic direction (one cell fewer than vertices) puts its extra vertex on the last rank. A non-periodic direction of P*m cells therefore gives every rank m cells.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n_vert | |||
| integer, | intent(in) | :: | nproc | |||
| integer, | intent(in) | :: | nrank | |||
| logical, | intent(in) | :: | periodic | |||
| integer, | intent(out) | :: | n_loc | |||
| integer, | intent(out) | :: | offset |