max_residual_lvl Function

private function max_residual_lvl(mg, lvl)

Arguments

Type IntentOptional Attributes Name
type(mg_t), intent(inout) :: mg
integer, intent(in) :: lvl

Return Value real(kind=dp)


Calls

proc~~max_residual_lvl~3~~CallsGraph proc~max_residual_lvl~3 max_residual_lvl proc~residual_box~3 residual_box proc~max_residual_lvl~3->proc~residual_box~3

Called by

proc~~max_residual_lvl~3~~CalledByGraph proc~max_residual_lvl~3 max_residual_lvl proc~mg_fas_vcycle~3 mg_fas_vcycle proc~mg_fas_vcycle~3->proc~max_residual_lvl~3 proc~diffusion_solve_acoeff~3 diffusion_solve_acoeff proc~diffusion_solve_acoeff~3->proc~mg_fas_vcycle~3 proc~mg_fas_fmg~3 mg_fas_fmg proc~diffusion_solve_acoeff~3->proc~mg_fas_fmg~3 proc~diffusion_solve_vcoeff~3 diffusion_solve_vcoeff proc~diffusion_solve_vcoeff~3->proc~mg_fas_vcycle~3 proc~diffusion_solve_vcoeff~3->proc~mg_fas_fmg~3 proc~diffusion_solve~3 diffusion_solve proc~diffusion_solve~3->proc~mg_fas_vcycle~3 proc~diffusion_solve~3->proc~mg_fas_fmg~3 proc~mg_fas_fmg~3->proc~mg_fas_vcycle~3

Source Code

  real(dp) function max_residual_lvl(mg, lvl)
    type(mg_t), intent(inout) :: mg
    integer, intent(in)       :: lvl
    integer                   :: i, id, nc
    real(dp)                  :: res

    nc           = mg%box_size_lvl(lvl)
    max_residual_lvl = 0.0_dp

    do i = 1, size(mg%lvls(lvl)%my_ids)
       id = mg%lvls(lvl)%my_ids(i)
       call residual_box(mg, id, nc)
       res = maxval(abs(mg%boxes(id)%cc(1:nc, 1:nc, 1:nc, mg_ires)))
       max_residual_lvl = max(max_residual_lvl, res)
    end do
  end function max_residual_lvl