subroutine box_gc_for_neighbor(box, nb, nc, iv, gc)
type(mg_box_t), intent(in) :: box
integer, intent(in) :: nb, nc, iv
real(dp), intent(out) :: gc(nc, nc)
select case (nb)
case (mg_neighb_lowx)
gc = box%cc(1, 1:nc, 1:nc, iv)
case (mg_neighb_highx)
gc = box%cc(nc, 1:nc, 1:nc, iv)
case (mg_neighb_lowy)
gc = box%cc(1:nc, 1, 1:nc, iv)
case (mg_neighb_highy)
gc = box%cc(1:nc, nc, 1:nc, iv)
case (mg_neighb_lowz)
gc = box%cc(1:nc, 1:nc, 1, iv)
case (mg_neighb_highz)
gc = box%cc(1:nc, 1:nc, nc, iv)
end select
end subroutine box_gc_for_neighbor