subroutine SideExchange_MappedScalar3D(this,mesh)
implicit none
class(MappedScalar3D),intent(inout) :: this
type(Mesh3D),intent(inout) :: mesh
! Local
integer :: offset
offset = mesh%decomp%offsetElem(mesh%decomp%rankId+1)
if(mesh%decomp%mpiEnabled) then
call this%MPIExchangeAsync(mesh)
endif
call SideExchange_3D_gpu(this%extboundary_gpu, &
this%boundary_gpu,mesh%sideinfo_gpu,mesh%decomp%elemToRank_gpu, &
mesh%decomp%rankid,offset,this%interp%N,this%nvar,this%nelem)
if(mesh%decomp%mpiEnabled) then
call mesh%decomp%FinalizeMPIExchangeAsync()
! Apply side flips for data exchanged with MPI
call ApplyFlip_3D_gpu(this%extboundary_gpu,mesh%sideInfo_gpu, &
mesh%decomp%elemToRank_gpu,mesh%decomp%rankId, &
offset,this%interp%N,this%nVar,this%nElem)
endif
endsubroutine SideExchange_MappedScalar3D