Neighbour ranks are supplied by the caller (from MPI_Cart_shift) so this stays pure and unit-testable with synthetic coordinates.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | coord_x | = | -1 | ||
| integer, | public | :: | coord_y | = | -1 | ||
| integer, | public | :: | dim_x | = | -1 | ||
| integer, | public | :: | dim_y | = | -1 | ||
| integer, | public | :: | nx_global | = | -1 | ||
| integer, | public | :: | ny_global | = | -1 | ||
| integer, | public | :: | nx_local | = | -1 | ||
| integer, | public | :: | ny_local | = | -1 | ||
| integer, | public | :: | ix_first_global | = | -1 | ||
| integer, | public | :: | ix_last_global | = | -1 | ||
| integer, | public | :: | iy_first_global | = | -1 | ||
| integer, | public | :: | iy_last_global | = | -1 | ||
| integer, | public | :: | halo_width | = | -1 | ||
| integer, | public | :: | x_lo_neighbour | = | -1 | ||
| integer, | public | :: | x_hi_neighbour | = | -1 | ||
| integer, | public | :: | y_lo_neighbour | = | -1 | ||
| integer, | public | :: | y_hi_neighbour | = | -1 | ||
| logical, | public | :: | periodic_x | = | .false. | ||
| logical, | public | :: | periodic_y | = | .false. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | coords(2) | |||
| integer, | intent(in) | :: | dims(2) | |||
| integer, | intent(in) | :: | nx_global | |||
| integer, | intent(in) | :: | ny_global | |||
| integer, | intent(in) | :: | halo_width | |||
| logical, | intent(in) | :: | periodic_x | |||
| logical, | intent(in) | :: | periodic_y | |||
| integer, | intent(in) | :: | x_lo | |||
| integer, | intent(in) | :: | x_hi | |||
| integer, | intent(in) | :: | y_lo | |||
| integer, | intent(in) | :: | y_hi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(decomp_2d_t), | intent(in) | :: | d |
Split one Cartesian axis (n_global cells across dim process slots) for
the slot at coord. Delegates to the shared 1D slab-partition helpers so
the per-axis block layout matches the 1D decompose() exactly (single
source of truth: domain_decomposition%rank_local_count/rank_first_global).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | coord | |||
| integer, | intent(in) | :: | dim | |||
| integer, | intent(in) | :: | n_global | |||
| integer, | intent(out) | :: | n_local | |||
| integer, | intent(out) | :: | i_first | |||
| integer, | intent(out) | :: | i_last |
Abort with a clear message if either local tile dimension is too small to
hold the halo cells the chosen reconstruction scheme requires. Mirrors the
1D validate_decomp; called from the 2D driver right after the
decomposition is built (an over-fine MPI process grid, e.g. a thin axis
from MPI_Dims_create, would otherwise silently over-read halos).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(decomp_2d_t), | intent(in) | :: | d |