advect1 Subroutine

private subroutine advect1(method, dtfactor, idimmin, idimmax, qtC, psa, bga, qt, psb, bgb)

Uses

  • proc~~advect1~~UsesGraph proc~advect1 advect1 mod_finite_volume mod_finite_volume proc~advect1->mod_finite_volume mod_physics mod_physics proc~advect1->mod_physics module~mod_fix_conserve mod_fix_conserve proc~advect1->module~mod_fix_conserve module~mod_ghostcells_update mod_ghostcells_update proc~advect1->module~mod_ghostcells_update module~mod_global_parameters mod_global_parameters proc~advect1->module~mod_global_parameters module~mod_usr_methods mod_usr_methods proc~advect1->module~mod_usr_methods module~mod_mpi_wrapper mod_mpi_wrapper module~mod_fix_conserve->module~mod_mpi_wrapper module~mod_ghostcells_update->module~mod_mpi_wrapper module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_mpi_wrapper->mpi module~mod_variables->module~mod_basic_types

Integrate all grids by one partial step

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: method(nlevelshi)
double precision, intent(in) :: dtfactor

Advance over dtfactor * dt

integer, intent(in) :: idimmin
integer, intent(in) :: idimmax
double precision, intent(in) :: qtC
type(state), target :: psa(max_blocks)

Compute fluxes based on this state

type(block_grid_t) :: bga

Compute fluxes based on this state

double precision, intent(in) :: qt
type(state), target :: psb(max_blocks)

Update solution on this state

type(block_grid_t) :: bgb

Update solution on this state


Calls

proc~~advect1~~CallsGraph proc~advect1 advect1 finite_volume_local finite_volume_local proc~advect1->finite_volume_local proc~fix_conserve fix_conserve proc~advect1->proc~fix_conserve proc~getbc getbc proc~advect1->proc~getbc proc~recvflux recvflux proc~advect1->proc~recvflux proc~sendflux sendflux proc~advect1->proc~sendflux mpi_get_count mpi_get_count proc~fix_conserve->mpi_get_count mpi_waitall mpi_waitall proc~fix_conserve->mpi_waitall proc~mpistop mpistop proc~fix_conserve->proc~mpistop proc~getbc->mpi_waitall mpi_wtime mpi_wtime proc~getbc->mpi_wtime phys_boundary_adjust phys_boundary_adjust proc~getbc->phys_boundary_adjust proc~fill_boundary_after_gc fill_boundary_after_gc proc~getbc->proc~fill_boundary_after_gc proc~fill_boundary_before_gc fill_boundary_before_gc proc~getbc->proc~fill_boundary_before_gc proc~fill_coarse_boundary fill_coarse_boundary proc~getbc->proc~fill_coarse_boundary proc~getintbc getintbc proc~getbc->proc~getintbc proc~idecode~2 idecode proc~getbc->proc~idecode~2 proc~mpi_irecv_wrapper mpi_irecv_wrapper proc~getbc->proc~mpi_irecv_wrapper proc~mpi_isend_wrapper mpi_isend_wrapper proc~getbc->proc~mpi_isend_wrapper proc~nvtxendrange~2 nvtxEndRange proc~getbc->proc~nvtxendrange~2 proc~nvtxstartrange~2 nvtxStartRange proc~getbc->proc~nvtxstartrange~2 proc~skip_direction skip_direction proc~getbc->proc~skip_direction proc~recvflux->proc~mpi_irecv_wrapper proc~sendflux->proc~mpi_isend_wrapper proc~bc_phys bc_phys proc~fill_boundary_after_gc->proc~bc_phys proc~fill_boundary_before_gc->proc~bc_phys proc~fill_coarse_boundary->proc~bc_phys proc~sync_positions_host sync_positions_host proc~getintbc->proc~sync_positions_host mpi_irecv mpi_irecv proc~mpi_irecv_wrapper->mpi_irecv mpi_isend mpi_isend proc~mpi_isend_wrapper->mpi_isend mpi_abort mpi_abort proc~mpistop->mpi_abort specialbound_usr specialbound_usr proc~bc_phys->specialbound_usr

Called by

proc~~advect1~~CalledByGraph proc~advect1 advect1 proc~advect advect proc~advect->proc~advect1 proc~advance advance proc~advance->proc~advect proc~timeintegration timeintegration proc~timeintegration->proc~advance proc~main main proc~main->proc~timeintegration program~agile agile program~agile->proc~main

Source Code

  subroutine advect1(method,dtfactor,idimmin,idimmax,qtC,psa,bga,qt,psb,bgb)
    use mod_global_parameters
    use mod_ghostcells_update
    use mod_fix_conserve
    use mod_physics
    use mod_finite_volume, only: finite_volume_local
    use mod_usr_methods

    integer, intent(in)          :: idimmin,idimmax
    integer :: ixOmin1,ixOmin2,ixOmin3,ixOmax1,ixOmax2,ixOmax3
    type(state), target          :: psa(max_blocks)
    !< Compute fluxes based on this state
    type(state), target          :: psb(max_blocks)
    !< Update solution on this state
    type(block_grid_t)           :: bga
    !< Compute fluxes based on this state
    type(block_grid_t)           :: bgb
    !< Update solution on this state
    double precision, intent(in) :: dtfactor
    !< Advance over dtfactor * dt
    double precision, intent(in) :: qtC
    double precision, intent(in) :: qt
    integer, intent(in)          :: method(nlevelshi)
    double precision             :: qdt
    integer                      :: iigrid, igrid

    istep = istep+1

    ! AGILE doesn't happen in our test case
    ! if(associated(phys_special_advance)) then
    !  call phys_special_advance(qtC,psa)
    ! end if

    qdt=dtfactor*dt
    ! FIXME: AGILE The following replaces the `call advect1_grid` loop. The
    ! `advect1_grid` variable is a function pointer to the configured solver.
    ! Since NVidia doesn't support function pointers, we hard-code to use
    ! `finite_volume_all` here. In the future this needs to be replaced with
    ! some logic to select the desired method.

    ixOmin1=ixGlo1+nghostcells;ixOmin2=ixGlo2+nghostcells
    ixOmin3=ixGlo3+nghostcells;ixOmax1=ixGhi1-nghostcells
    ixOmax2=ixGhi2-nghostcells;ixOmax3=ixGhi3-nghostcells;
    call finite_volume_local( &
        qdt, dtfactor, & !some scalars related to time stepping
        ixGlo1,ixGlo2,ixGlo3,ixGhi1,ixGhi2,ixGhi3,ixOmin1,ixOmin2,ixOmin3,&
           ixOmax1,ixOmax2,ixOmax3, idimmin,idimmax, & !bounds for some arrays
        qtC, &                          ! scalar related to time stepping
        bga, &                          ! first block grid
        qt,  &                          ! scalar related to time stepping
        bgb  &                          ! second block grid
        )

    ! AGILE: todo
    ! if (fix_conserve_global .and. fix_conserve_at_step) then

    ! JESSENEW 
    call recvflux(idimmin,idimmax)
    call sendflux(idimmin,idimmax)
    call fix_conserve(bgb%istep,idimmin,idimmax,1,nwflux)

    !   if(stagger_grid) then
    !     call fix_edges(psb,idimmin,idimmax)
    !     ! fill the cell-center values from the updated staggered variables
    !     do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
    !       call phys_face_to_center(ixMlo1,ixMlo2,ixMlo3,ixMhi1,ixMhi2,ixMhi3,&
    !          psb(igrid))
    !     end do
    !   end if
    ! end if

    
    ! For all grids: fill ghost cells
    call getbc(qt+qdt,qdt,psb,iwstart,nwgc,phys_req_diagonal)

  end subroutine advect1