setgradientboundarycondition_DGModel1D Subroutine

public 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.

Arguments

TypeIntentOptionalAttributesName
class(DGModel1D), intent(inout) :: this

Calls

proc~~setgradientboundarycondition_dgmodel1d~~CallsGraph proc~setgradientboundarycondition_dgmodel1d setgradientboundarycondition_DGModel1D interface~hipmemcpy hipMemcpy proc~setgradientboundarycondition_dgmodel1d->interface~hipmemcpy proc~gpucheck gpuCheck proc~setgradientboundarycondition_dgmodel1d->proc~gpucheck proc~setgradientboundarycondition_dgmodel1d_t setgradientboundarycondition_DGModel1D_t proc~setgradientboundarycondition_dgmodel1d->proc~setgradientboundarycondition_dgmodel1d_t

Contents


Source Code

  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