Fill ghost cells near refinement boundaries which preserves diffusive fluxes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mg_box_t), | intent(inout) | :: | box | |||
| integer, | intent(in) | :: | nc | |||
| integer, | intent(in) | :: | iv | |||
| integer, | intent(in) | :: | nb |
Ghost cell direction |
||
| real(kind=dp), | intent(in) | :: | gc(1) |
Interpolated coarse grid ghost cell data (but not yet in the nb direction) |
subroutine sides_rb(box, nc, iv, nb, gc) type(mg_box_t), intent(inout) :: box integer, intent(in) :: nc integer, intent(in) :: iv integer, intent(in) :: nb !< Ghost cell direction !> Interpolated coarse grid ghost cell data (but not yet in the nb direction) real(dp), intent(in) :: gc(1) integer :: di integer :: i, ix, dix if (mg_neighb_low(nb)) then ix = 1 dix = 1 else ix = nc dix = -1 end if select case (mg_neighb_dim(nb)) case (1) i = ix di = dix box%cc(i-di, iv) = (2 * gc(1) + box%cc(i, iv))/3.0_dp end select end subroutine sides_rb