Physical boundary conditions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(state), | intent(inout) | :: | s | |||
| integer, | intent(in) | :: | igrid | |||
| double precision, | intent(in) | :: | time | |||
| double precision, | intent(in) | :: | qdt |
subroutine fill_boundary_after_gc(s,igrid,time,qdt) use mod_global_parameters use mod_boundary_conditions, only: bc_phys type(state), intent(inout) :: s integer, intent(in) :: igrid double precision, intent(in) :: time, qdt integer :: idims,iside,i1,i2,i3,kmin1,kmin2,kmin3,kmax1,kmax2,kmax3,& ixBmin1,ixBmin2,ixBmin3,ixBmax1,ixBmax2,ixBmax3 do idims=1,ndim ! to avoid using as yet unknown corner info in more than 1D, we ! fill only interior mesh ranges of the ghost cell ranges at first, ! and progressively enlarge the ranges to include corners later kmin1=0; kmax1=0; kmin2=merge(1, 0, idims .lt. 2 .and. neighbor_type(0,-1,0,& igrid)==1) kmax2=merge(1, 0, idims .lt. 2 .and. neighbor_type(0, 1,0,& igrid)==1) kmin3=merge(1, 0, idims .lt. 3 .and. neighbor_type(0,0,-1,& igrid)==1) kmax3=merge(1, 0, idims .lt. 3 .and. neighbor_type(0,0, 1,& igrid)==1) ixBmin1=ixGlo1+kmin1*nghostcells;ixBmin2=ixGlo2+kmin2*nghostcells ixBmin3=ixGlo3+kmin3*nghostcells; ixBmax1=ixGhi1-kmax1*nghostcells;ixBmax2=ixGhi2-kmax2*nghostcells ixBmax3=ixGhi3-kmax3*nghostcells; do iside=1,2 i1=kr(1,idims)*(2*iside-3);i2=kr(2,idims)*(2*iside-3) i3=kr(3,idims)*(2*iside-3); if (aperiodB(idims)) then if (neighbor_type(i1,i2,i3,& igrid) /= neighbor_boundary .and. .not. & s%is_physical_boundary(2*idims-2+iside)) cycle else if (neighbor_type(i1,i2,i3,igrid) /= neighbor_boundary) cycle end if call bc_phys(iside,idims,time,qdt,s,bgeo%x(:,:,:,:,igrid),& ixGlo1,ixGlo2,ixGlo3,& ixGhi1,ixGhi2,ixGhi3,ixBmin1,ixBmin2,ixBmin3,ixBmax1,ixBmax2,& ixBmax3) end do end do end subroutine fill_boundary_after_gc