Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/source/pages/api_domain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,26 @@ The algorithm will choose the closest combination such as
n\_proc=n\_col=\sqrt{nproc}

In case the root is not exact the closest combitation to have :math:`n\_proc \approx n\_col` with
`n\_proc < n\_col` is used.
`n\_proc < n\_col` is used.
If a 1D slab decomposition is needed instead of a 2D pencil one, it is recommended to set ``p_row`` to unity and ``p_col`` to ``nproc``.

An optional parameter may be passed to this initialisation routine:

::

call decomp_2d_init(nx, ny, nz, p_row, p_col,periodic_bc)
call decomp_2d_init(nx, ny, nz, p_row, p_col, periodic_bc)

Here periodic_bc is a 1D array containing 3 logical values that specify whether periodic boundary condition
Here ``periodic_bc`` is a 1D array containing 3 logical values that specify whether periodic boundary condition
should apply in certain dimensions. Note this is only applicable if halo-cell communication is to be used.

Another optional parameter may be passed at the initialization stage:

::

call decomp_2d_init(nx, ny, nz, p_row, p_col, periodic_bc, comm)

Here ``comm`` is the MPI communicator that the library will use. By default, MPI_COMM_WORLD is used.

A key element of this library is a set of communication routines that actually perform the data transpositions.
As mentioned, one needs to perform 4 global transpositions to go through all 3 pencil orientations.
Correspondingly, the library provides 4 communication subroutines:
Expand Down