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_newton_solve try_newton_solve proc~solve_nonlinear_system->proc~try_newton_solve proc~numerical_jacobian numerical_jacobian proc~try_newton_solve->proc~numerical_jacobian proc~residual_norm residual_norm proc~try_newton_solve->proc~residual_norm proc~solve_small_linear_system solve_small_linear_system proc~try_newton_solve->proc~solve_small_linear_system

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~solve_zhao_unknowns solve_zhao_unknowns proc~solve_zhao_unknowns->proc~try_solve_zhao_branch_b proc~solve_zhao_unknowns->proc~solve_zhao_branch_b proc~resolve_sheath_injection_context resolve_sheath_injection_context proc~resolve_sheath_injection_context->proc~solve_zhao_unknowns proc~init_particle_batch_from_config init_particle_batch_from_config proc~init_particle_batch_from_config->proc~resolve_sheath_injection_context

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)

    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