mg_ix_to_ichild Function

public function mg_ix_to_ichild(ix)

Compute the child index for a box with spatial index ix. With child index we mean the index in the children(:) array of its parent.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ix(2)

Spatial index of the box

Return Value integer


Called by

proc~~mg_ix_to_ichild~~CalledByGraph proc~mg_ix_to_ichild mg_ix_to_ichild proc~find_neighb find_neighb proc~find_neighb->proc~mg_ix_to_ichild proc~restrict_set_buffer restrict_set_buffer proc~restrict_set_buffer->proc~mg_ix_to_ichild proc~mg_restrict_lvl mg_restrict_lvl proc~mg_restrict_lvl->proc~restrict_set_buffer proc~set_neighbs set_neighbs proc~set_neighbs->proc~find_neighb proc~mg_restrict mg_restrict proc~mg_restrict->proc~mg_restrict_lvl proc~mg_set_neighbors_lvl mg_set_neighbors_lvl proc~mg_set_neighbors_lvl->proc~set_neighbs proc~update_coarse update_coarse proc~update_coarse->proc~mg_restrict_lvl proc~mg_build_rectangle mg_build_rectangle proc~mg_build_rectangle->proc~mg_set_neighbors_lvl proc~mg_fas_fmg mg_fas_fmg proc~mg_fas_fmg->proc~update_coarse proc~mg_fas_vcycle mg_fas_vcycle proc~mg_fas_fmg->proc~mg_fas_vcycle proc~mg_fas_vcycle->proc~update_coarse proc~diffusion_solve diffusion_solve proc~diffusion_solve->proc~mg_fas_fmg proc~diffusion_solve->proc~mg_fas_vcycle proc~diffusion_solve_acoeff diffusion_solve_acoeff proc~diffusion_solve_acoeff->proc~mg_fas_fmg proc~diffusion_solve_acoeff->proc~mg_fas_vcycle proc~diffusion_solve_vcoeff diffusion_solve_vcoeff proc~diffusion_solve_vcoeff->proc~mg_fas_fmg proc~diffusion_solve_vcoeff->proc~mg_fas_vcycle

Source Code

  integer function mg_ix_to_ichild(ix)
    integer, intent(in) :: ix(2)
    !< Spatial index of the box
    ! The index can range from 1 (all ix odd) and 2**$D (all ix even)
    mg_ix_to_ichild = 4 - 2 * iand(ix(2), 1) - iand(ix(1), 1)
  end function mg_ix_to_ichild