Apply gradient boundary conditions on GPU. Syncs gradient boundary data from device, applies host-side BC dispatch (periodic defaults + registered BCs), then syncs back to device.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel1D), | intent(inout) | :: | this |
subroutine setgradientboundarycondition_DGModel1D(this)
!! Apply gradient boundary conditions on GPU.
!! Syncs gradient boundary data from device, applies host-side BC dispatch
!! (periodic defaults + registered BCs), then syncs back to device.
implicit none
class(DGModel1D),intent(inout) :: this
call gpuCheck(hipMemcpy(c_loc(this%solutiongradient%boundary), &
this%solutiongradient%boundary_gpu,sizeof(this%solutiongradient%boundary), &
hipMemcpyDeviceToHost))
call setgradientboundarycondition_DGModel1D_t(this)
call gpuCheck(hipMemcpy(this%solutiongradient%extBoundary_gpu, &
c_loc(this%solutiongradient%extBoundary), &
sizeof(this%solutiongradient%extBoundary), &
hipMemcpyHostToDevice))
endsubroutine setgradientboundarycondition_DGModel1D