Lazily allocates the device staging buffer for the anisotropic mortars, sized for all 3*nvar trace lines.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MappedVector3D), | intent(inout) | :: | this | |||
| type(Mesh3D), | intent(in) | :: | mesh |
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