Type to represent the domain decomposition for parallel processing
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | communicator |
The ID of the communicator for this domain |
|||
| integer, | public | :: | dims(2) |
The dimensions of the MPI communicators Cartesian grid |
|||
| integer, | public | :: | neighbours(4) |
The ranks of the neighbouring ranks - [down, left, up, right] |
Subroutine to exchange boundaries between neighboring ranks
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout), | dimension(:,:) | :: | board |
The board to be exchanged |
|
| integer, | intent(in) | :: | local_nrows |
The number of rows in the local board |
||
| integer, | intent(in) | :: | local_ncols |
The number of columns in the local board |
||
| type(DomainDecomposition), | intent(in) | :: | domainDecomp |
The domain decomposition object |
Subroutine to get local grid information for a rank
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(DomainDecomposition), | intent(inout) | :: | domainDecomp |
The MPI communication domain decomposition object |
||
| integer, | intent(in) | :: | rank |
The rank of the current process |
||
| integer, | intent(in) | :: | global_nrows |
The number of columns in the global board |
||
| integer, | intent(in) | :: | global_ncols |
The number of rows in the global board |
||
| integer, | intent(out) | :: | nrows_per_rank |
The number of columns per rank |
||
| integer, | intent(out) | :: | ncols_per_rank |
The number of rows per rank |
||
| integer, | intent(out) | :: | coords(2) |
The coordinates of the current rank in the Cartesian grid |
||
| integer, | intent(out) | :: | row_start |
The starting column index for the local grid |
||
| integer, | intent(out) | :: | col_start |
The starting row index for the local grid |
||
| integer, | intent(out) | :: | local_nrows |
The number of columns in the local grid |
||
| integer, | intent(out) | :: | local_ncols |
The number of rows in the local grid |