subroutine setboundarycondition_LinearShallowWater2D(this)
implicit none
class(LinearShallowWater2D),intent(inout) :: this
integer :: i,iel,j,e2,bcid
real(prec) :: x(1:2)
if(this%prescribed_bcs_enabled) then
call gpuCheck(hipMemcpy(c_loc(this%solution%extBoundary), &
this%solution%extBoundary_gpu, &
sizeof(this%solution%extBoundary), &
hipMemcpyDeviceToHost))
do iel = 1,this%solution%nelem
do j = 1,4
bcid = this%mesh%sideinfo(5,j,iel)
e2 = this%mesh%sideinfo(3,j,iel)
if(e2 == 0) then
if(bcid == SELF_BC_PRESCRIBED) then
do i = 1,this%solution%interp%N+1
x = this%geometry%x%boundary(i,j,iel,1,1:2)
this%solution%extBoundary(i,j,iel,1:this%nvar) = &
this%hbc2d_Prescribed(x,this%t)
enddo
endif
endif
enddo
enddo
call gpucheck(hipMemcpy(this%solution%extBoundary_gpu, &
c_loc(this%solution%extBoundary), &
sizeof(this%solution%extBoundary), &
hipMemcpyHostToDevice))
endif
call setboundarycondition_LinearShallowWater2D_gpu(this%solution%extboundary_gpu, &
this%solution%boundary_gpu, &
this%mesh%sideInfo_gpu, &
this%geometry%nhat%boundary_gpu, &
this%solution%interp%N, &
this%solution%nelem, &
this%solution%nvar)
endsubroutine setboundarycondition_LinearShallowWater2D