sides_rb Subroutine

private subroutine sides_rb(box, nc, iv, nb, gc)

Fill ghost cells near refinement boundaries which preserves diffusive fluxes.

Arguments

Type IntentOptional 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)


Called by

proc~~sides_rb~2~~CalledByGraph proc~sides_rb~2 sides_rb proc~fill_refinement_bnd~2 fill_refinement_bnd proc~fill_refinement_bnd~2->proc~sides_rb~2 proc~set_ghost_cells~2 set_ghost_cells proc~set_ghost_cells~2->proc~fill_refinement_bnd~2 proc~mg_fill_ghost_cells_lvl~2 mg_fill_ghost_cells_lvl proc~mg_fill_ghost_cells_lvl~2->proc~set_ghost_cells~2 proc~mg_ghost_cell_buffer_size~2 mg_ghost_cell_buffer_size proc~mg_ghost_cell_buffer_size~2->proc~set_ghost_cells~2 proc~mg_allocate_storage~2 mg_allocate_storage proc~mg_allocate_storage~2->proc~mg_ghost_cell_buffer_size~2 proc~mg_fas_fmg~2 mg_fas_fmg proc~mg_fas_fmg~2->proc~mg_fill_ghost_cells_lvl~2 proc~mg_fas_vcycle~2 mg_fas_vcycle proc~mg_fas_fmg~2->proc~mg_fas_vcycle~2 proc~update_coarse~2 update_coarse proc~mg_fas_fmg~2->proc~update_coarse~2 proc~mg_fas_vcycle~2->proc~mg_fill_ghost_cells_lvl~2 proc~smooth_boxes~2 smooth_boxes proc~mg_fas_vcycle~2->proc~smooth_boxes~2 proc~mg_fas_vcycle~2->proc~update_coarse~2 proc~mg_fill_ghost_cells~2 mg_fill_ghost_cells proc~mg_fill_ghost_cells~2->proc~mg_fill_ghost_cells_lvl~2 proc~smooth_boxes~2->proc~mg_fill_ghost_cells_lvl~2 proc~update_coarse~2->proc~mg_fill_ghost_cells_lvl~2 proc~diffusion_solve_acoeff~2 diffusion_solve_acoeff proc~diffusion_solve_acoeff~2->proc~mg_fas_fmg~2 proc~diffusion_solve_acoeff~2->proc~mg_fas_vcycle~2 proc~diffusion_solve_vcoeff~2 diffusion_solve_vcoeff proc~diffusion_solve_vcoeff~2->proc~mg_fas_fmg~2 proc~diffusion_solve_vcoeff~2->proc~mg_fas_vcycle~2 proc~diffusion_solve~2 diffusion_solve proc~diffusion_solve~2->proc~mg_fas_fmg~2 proc~diffusion_solve~2->proc~mg_fas_vcycle~2

Source Code

  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