GPU implementation of AnisoMortarFluxCollect (see the base class for the algorithm and conservation statement).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MappedVector3D), | intent(inout) | :: | this | |||
| type(Mesh3D), | intent(inout) | :: | mesh |
subroutine AnisoMortarFluxCollect_MappedVector3D(this,mesh)
!! GPU implementation of AnisoMortarFluxCollect (see the base class for the
!! algorithm and conservation statement).
implicit none
class(MappedVector3D),intent(inout) :: this
type(Mesh3D),intent(inout) :: mesh
! Local
integer :: offset
offset = mesh%decomp%offsetElem(mesh%decomp%rankId+1)
call AllocateAnisoMortarBuff_MappedVector3D(this,mesh)
if(mesh%decomp%mpiEnabled) then
call this%MPIAnisoMortarFluxAsync(mesh)
endif
! Stage rank-local small-face integrands (the big-face slots are gathered too but
! unused by the flux scatter)
call AnisoMortarGather_3D_gpu(this%anisoMortarBuff_gpu,this%boundarynormal_gpu, &
mesh%anisoMortarInfo_gpu,mesh%decomp%elemToRank_gpu, &
mesh%decomp%rankId,offset,this%interp%N,this%nvar, &
mesh%nAnisoMortars,this%nelem)
if(mesh%decomp%mpiEnabled) then
call mesh%decomp%FinalizeMPIExchangeAsync()
call AnisoMortarFlip_3D_gpu(this%anisoMortarBuff_gpu,mesh%anisoMortarInfo_gpu, &
mesh%decomp%elemToRank_gpu,mesh%decomp%rankId, &
this%interp%N,this%nvar,mesh%nAnisoMortars)
endif
call AnisoMortarFluxScatter_3D_gpu(this%boundarynormal_gpu,this%anisoMortarBuff_gpu, &
this%interp%mortarP_gpu, &
mesh%anisoMortarInfo_gpu,mesh%decomp%elemToRank_gpu, &
mesh%decomp%rankId,offset,this%interp%N,this%nvar, &
mesh%nAnisoMortars,this%nelem)
endsubroutine AnisoMortarFluxCollect_MappedVector3D