get_relative_resnorm Subroutine

private subroutine get_relative_resnorm(control)

Get relative residual with respect to first iteration residual

Arguments

Type IntentOptional AttributesName
type(controltype), intent(inout) :: control

Control parameters: iterations


Called by

proc~~get_relative_resnorm~~CalledByGraph proc~get_relative_resnorm get_relative_resnorm proc~find_resnorm find_resnorm proc~find_resnorm->proc~get_relative_resnorm proc~iterate_one_more_time_step iterate_one_more_time_step proc~iterate_one_more_time_step->proc~find_resnorm program~main main program~main->proc~iterate_one_more_time_step

Contents

Source Code


Source Code

    subroutine get_relative_resnorm(control)
      !< Get relative residual with respect to first iteration residual
      implicit none
      type(controltype), intent(inout) :: control
      !< Control parameters: iterations
      if(control%current_iter<=Res_itr) Res_save=Res_abs
      if(control%start_from/=0) then
        Res_save=control%previous_Res
      else
        control%previous_Res = Res_save
      end if
      Res_rel = Res_abs/Res_save
    end subroutine get_relative_resnorm