3D T-fold halo-fill — identical per level.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | fld(nx_total,ny_total,nz) |
Cell-centred 3D field, shape (nx_total, ny_total, nz). |
||
| integer, | intent(in) | :: | nx_total | |||
| integer, | intent(in) | :: | ny_total | |||
| integer, | intent(in) | :: | nz | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| integer, | intent(in) | :: | nghost |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | isum | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | j_lo | ||||
| integer, | private | :: | jsum | ||||
| integer, | private | :: | k |
pure subroutine fold_north_centre_3d(fld, nx_total, ny_total, nz, & nx_phys, ny_phys, nghost) !! 3D T-fold halo-fill — identical per level. integer, intent(in) :: nx_total, ny_total, nz, nx_phys, ny_phys, nghost real(wp), intent(inout) :: fld(nx_total, ny_total, nz) !! Cell-centred 3D field, shape (nx_total, ny_total, nz). integer :: i, j, k, isum, jsum, j_lo isum = 2*nghost + nx_phys + 1 jsum = 2*nghost + 2*ny_phys + 1 j_lo = nghost + ny_phys + 1 do concurrent(k=1:nz, j=j_lo:ny_total, i=1:nx_total) fld(i, j, k) = fld(isum - i, jsum - j, k) end do end subroutine fold_north_centre_3d