AllocateAnisoMortarBuff_MappedVector3D Subroutine

public subroutine AllocateAnisoMortarBuff_MappedVector3D(this, mesh)

Lazily allocates the device staging buffer for the anisotropic mortars, sized for all 3*nvar trace lines.

Arguments

TypeIntentOptionalAttributesName
class(MappedVector3D), intent(inout) :: this
type(Mesh3D), intent(in) :: mesh

Calls

proc~~allocateanisomortarbuff_mappedvector3d~~CallsGraph proc~allocateanisomortarbuff_mappedvector3d AllocateAnisoMortarBuff_MappedVector3D interface~hipmalloc hipMalloc proc~allocateanisomortarbuff_mappedvector3d->interface~hipmalloc proc~gpucheck gpuCheck proc~allocateanisomortarbuff_mappedvector3d->proc~gpucheck

Called by

proc~~allocateanisomortarbuff_mappedvector3d~~CalledByGraph proc~allocateanisomortarbuff_mappedvector3d AllocateAnisoMortarBuff_MappedVector3D proc~anisomortarexchange_mappedvector3d AnisoMortarExchange_MappedVector3D proc~anisomortarexchange_mappedvector3d->proc~allocateanisomortarbuff_mappedvector3d proc~anisomortarfluxcollect_mappedvector3d AnisoMortarFluxCollect_MappedVector3D proc~anisomortarfluxcollect_mappedvector3d->proc~allocateanisomortarbuff_mappedvector3d

Contents


Source Code

  subroutine AllocateAnisoMortarBuff_MappedVector3D(this,mesh)
    !! Lazily allocates the device staging buffer for the anisotropic mortars, sized for
    !! all 3*nvar trace lines.
    implicit none
    class(MappedVector3D),intent(inout) :: this
    type(Mesh3D),intent(in) :: mesh
    ! Local
    integer(c_size_t) :: buffSize

    if(.not. c_associated(this%anisoMortarBuff_gpu)) then
      ! AnisoMortarFlip_3D stages one face through shared memory (MORTAR3D_MAXNP).
      if(this%interp%N+1 > 16) then
        print*,__FILE__,' : Error : 3D mortar kernels support N+1 <= 16.'
        stop 1
      endif
      buffSize = int(this%interp%N+1,c_size_t)*(this%interp%N+1)*4* &
                 mesh%nAnisoMortars*this%nvar*3*prec
      call gpuCheck(hipMalloc(this%anisoMortarBuff_gpu,buffSize))
    endif

  endsubroutine AllocateAnisoMortarBuff_MappedVector3D