try_solve_zhao_branch_b Subroutine

public subroutine try_solve_zhao_branch_b(p, x, success)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: x(2)
logical, intent(out) :: success

Calls

proc~~try_solve_zhao_branch_b~~CallsGraph proc~try_solve_zhao_branch_b try_solve_zhao_branch_b proc~solve_nonlinear_system 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_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

Called by

proc~~try_solve_zhao_branch_b~~CalledByGraph proc~try_solve_zhao_branch_b try_solve_zhao_branch_b proc~solve_zhao_branch_b solve_zhao_branch_b proc~solve_zhao_branch_b->proc~try_solve_zhao_branch_b proc~try_solve_zhao_unknowns try_solve_zhao_unknowns proc~try_solve_zhao_unknowns->proc~try_solve_zhao_branch_b proc~evaluate_surface_current_model evaluate_surface_current_model proc~evaluate_surface_current_model->proc~try_solve_zhao_unknowns proc~solve_zhao_unknowns solve_zhao_unknowns proc~solve_zhao_unknowns->proc~try_solve_zhao_unknowns proc~evaluate_surface_closure evaluate_surface_closure proc~evaluate_surface_closure->proc~evaluate_surface_current_model

Source Code

  subroutine try_solve_zhao_branch_b(p, x, success)
    type(zhao_params_type), intent(in) :: p
    real(dp), intent(out) :: x(2)
    logical, intent(out) :: success

    real(dp) :: guesses(2, 3)

    call try_solve_zhao_monotonic_scalar(p, 'B', x, success)
    if (success) return
    guesses(:, 1) = [1.3d0, 7.0d6]
    guesses(:, 2) = [0.8d0, 6.5d6]
    guesses(:, 3) = [2.0d0, 7.8d6]
    call solve_nonlinear_system(2, guesses, residual_b, x, success)

  contains

    subroutine residual_b(xb, fb)
      real(dp), intent(in) :: xb(:)
      real(dp), intent(out) :: fb(:)

      call zhao_residuals_type_b(p, xb, fb)
    end subroutine residual_b

  end subroutine try_solve_zhao_branch_b