halo_exchange_3d Subroutine

public subroutine halo_exchange_3d(fld, decomp, nghost, nx_local, ny_local, nz)

Exchange ghost-cell halos for a 3D field (all nz layers packed per direction)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: fld(:,:,:)
type(decomp_t), intent(in) :: decomp
integer, intent(in) :: nghost
integer, intent(in) :: nx_local
integer, intent(in) :: ny_local
integer, intent(in) :: nz

Calls

proc~~halo_exchange_3d~~CallsGraph proc~halo_exchange_3d halo_exchange_3d proc~halo_exchange_2d halo_exchange_2d proc~halo_exchange_3d->proc~halo_exchange_2d irecv irecv proc~halo_exchange_2d->irecv isend isend proc~halo_exchange_2d->isend proc~comm_env_compute_comm comm_env_compute_comm proc~halo_exchange_2d->proc~comm_env_compute_comm proc~decomp_rank_from_coords decomp_rank_from_coords proc~halo_exchange_2d->proc~decomp_rank_from_coords waitall waitall proc~halo_exchange_2d->waitall comm_world comm_world proc~comm_env_compute_comm->comm_world

Variables

Type Visibility Attributes Name Initial
integer, private :: kk

Source Code

   subroutine halo_exchange_3d(fld, decomp, nghost, nx_local, ny_local, nz)
      !! Exchange ghost-cell halos for a 3D field (all nz layers packed per direction)
      real(wp), intent(inout) :: fld(:, :, :)
      type(decomp_t), intent(in) :: decomp
      integer, intent(in) :: nghost, nx_local, ny_local, nz

      integer :: kk

      do kk = 1, nz
         call halo_exchange_2d(fld(:, :, kk), decomp, nghost, nx_local, ny_local)
      end do

   end subroutine halo_exchange_3d