solve_zhao_unknowns Subroutine

public subroutine solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: model
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: phi0_v
real(kind=dp), intent(out) :: phi_m_v
real(kind=dp), intent(out) :: n_swe_inf_m3
character(len=1), intent(out) :: branch

Calls

proc~~solve_zhao_unknowns~~CallsGraph proc~solve_zhao_unknowns solve_zhao_unknowns proc~try_solve_zhao_unknowns try_solve_zhao_unknowns proc~solve_zhao_unknowns->proc~try_solve_zhao_unknowns proc~try_solve_zhao_branch_a try_solve_zhao_branch_a proc~try_solve_zhao_unknowns->proc~try_solve_zhao_branch_a proc~try_solve_zhao_branch_b try_solve_zhao_branch_b proc~try_solve_zhao_unknowns->proc~try_solve_zhao_branch_b proc~try_solve_zhao_branch_c try_solve_zhao_branch_c proc~try_solve_zhao_unknowns->proc~try_solve_zhao_branch_c proc~solve_nonlinear_system solve_nonlinear_system proc~try_solve_zhao_branch_a->proc~solve_nonlinear_system proc~try_solve_zhao_branch_b->proc~solve_nonlinear_system proc~try_solve_zhao_monotonic_scalar try_solve_zhao_monotonic_scalar proc~try_solve_zhao_branch_b->proc~try_solve_zhao_monotonic_scalar proc~try_solve_zhao_branch_c->proc~solve_nonlinear_system proc~try_solve_zhao_branch_c->proc~try_solve_zhao_monotonic_scalar proc~try_newton_solve try_newton_solve proc~solve_nonlinear_system->proc~try_newton_solve proc~evaluate_monotonic_stationary_phi evaluate_monotonic_stationary_phi proc~try_solve_zhao_monotonic_scalar->proc~evaluate_monotonic_stationary_phi proc~residual_norm residual_norm proc~try_solve_zhao_monotonic_scalar->proc~residual_norm proc~zhao_residuals_type_b zhao_residuals_type_b proc~try_solve_zhao_monotonic_scalar->proc~zhao_residuals_type_b proc~zhao_residuals_type_c zhao_residuals_type_c proc~try_solve_zhao_monotonic_scalar->proc~zhao_residuals_type_c proc~evaluate_monotonic_stationary_phi->proc~zhao_residuals_type_b proc~evaluate_monotonic_stationary_phi->proc~zhao_residuals_type_c proc~swe_free_current_term swe_free_current_term proc~evaluate_monotonic_stationary_phi->proc~swe_free_current_term proc~try_newton_solve->proc~residual_norm proc~numerical_jacobian numerical_jacobian proc~try_newton_solve->proc~numerical_jacobian proc~solve_small_linear_system solve_small_linear_system proc~try_newton_solve->proc~solve_small_linear_system proc~zhao_residuals_type_b->proc~swe_free_current_term proc~zhao_residuals_type_c->proc~swe_free_current_term

Source Code

  subroutine solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch)
    character(len=*), intent(in) :: model
    type(zhao_params_type), intent(in) :: p
    real(dp), intent(out) :: phi0_v, phi_m_v, n_swe_inf_m3
    character(len=1), intent(out) :: branch

    logical :: success

    call try_solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch, success)
    if (success) return

    select case (trim(model))
    case ('zhao_a')
      error stop 'Zhao Type-A root solve failed.'
    case ('zhao_b')
      error stop 'Zhao Type-B root solve failed.'
    case ('zhao_c')
      error stop 'Zhao Type-C root solve failed.'
    case ('zhao_auto')
      error stop 'Zhao sheath auto branch selection failed.'
    case default
      error stop 'Unknown Zhao sheath model.'
    end select
  end subroutine solve_zhao_unknowns