cart_setup_2d Subroutine

public subroutine cart_setup_2d(nx_global, ny_global, halo_width, periodic_x, periodic_y, d)

Create the Cartesian communicator (dims auto-chosen by MPI_Dims_create) and return this rank's per-rank decomposition.

              and all four axis-neighbour ranks.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx_global

Total interior cells in x.

integer, intent(in) :: ny_global

Total interior cells in x. Total interior cells in y.

integer, intent(in) :: halo_width

Total interior cells in x. Total interior cells in y. Ghost-cell layer width (scheme-derived).

logical, intent(in) :: periodic_x

Wrap in x?

logical, intent(in) :: periodic_y

Wrap in x? Wrap in y?

type(decomp_2d_t), intent(out) :: d

Output: per-rank decomposition including local extents