Apply boundary conditions for the solution on GPU. Syncs 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 setboundarycondition_DGModel1D(this)
!! Apply boundary conditions for the solution on GPU.
!! Syncs 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%solution%boundary), &
this%solution%boundary_gpu,sizeof(this%solution%boundary), &
hipMemcpyDeviceToHost))
call setboundarycondition_DGModel1D_t(this)
call gpuCheck(hipMemcpy(this%solution%extBoundary_gpu, &
c_loc(this%solution%extBoundary), &
sizeof(this%solution%extBoundary), &
hipMemcpyHostToDevice))
endsubroutine setboundarycondition_DGModel1D