Integrate all grids by one partial step
| Type | Intent | Optional | 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 |
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