homotopy Subroutine

public subroutine homotopy(sub, x, tol, max_its, its)

Uses

  • proc~~homotopy~~UsesGraph proc~homotopy homotopy module~yaeos__math yaeos__math proc~homotopy->module~yaeos__math module~yaeos__constants yaeos__constants module~yaeos__math->module~yaeos__constants module~yaeos__math_continuation yaeos__math_continuation module~yaeos__math->module~yaeos__math_continuation module~yaeos__math_linalg yaeos__math_linalg module~yaeos__math->module~yaeos__math_linalg iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__math_continuation->module~yaeos__constants module~yaeos__math_continuation->module~yaeos__math_linalg module~yaeos__math_linalg->module~yaeos__constants

homotopy

Description

Attempt a homotopy solve from an easy identity system to the target.

The internal residual is , where is the initial guess. The implementation advances t through ten equally spaced values and calls the damped Newton routine at each stage. It is a legacy helper with limited failure diagnostics.

Arguments

Type IntentOptional Attributes Name
procedure(to_solve) :: sub

Target residual/Jacobian callback.

real(kind=pr), intent(inout) :: x(:)

Initial guess, updated homotopy solution.

real(kind=pr), intent(in) :: tol

Absolute residual tolerance at each stage.

integer, intent(in) :: max_its

Present for interface compatibility; current implementation uses a fixed stage limit.

integer, intent(out) :: its

Iterations reported by the last Newton stage.


Calls

proc~~homotopy~~CallsGraph proc~homotopy homotopy none~wrap~2 wrap proc~homotopy->none~wrap~2 proc~newton~2 newton proc~homotopy->proc~newton~2 proc~solve_system solve_system proc~newton~2->proc~solve_system none~dgesv dgesv proc~solve_system->none~dgesv

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: F(size(X))
real(kind=pr), public :: G(size(X))
real(kind=pr), public :: H(size(X))
real(kind=pr), public :: X0(size(X))
real(kind=pr), public :: dF(size(X),size(X))
real(kind=pr), public :: dG(size(X),size(X))
real(kind=pr), public :: dH(size(X),size(X))
real(kind=pr), public :: dX(size(x))
real(kind=pr), public :: dt
integer, public :: i

Loop/index variable.

integer, public :: info

Solver status code.

integer, public :: nt
real(kind=pr), public :: t

Subroutines

subroutine fun(n, x, fvec, iflag)

MINPACK-style adapter for the homotopy residual callback.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

Number of unknowns.

real(kind=pr), intent(in) :: x(n)

Current unknown vector.

real(kind=pr), intent(out) :: fvec(n)

Residual vector.

integer, intent(inout) :: iflag

Solver callback status flag.

subroutine wrap(X, H, dH)

Evaluate the homotopy residual and Jacobian at the current stage.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: X(:)

Current homotopy unknown vector.

real(kind=pr), intent(out) :: H(:)

Homotopy residual vector.

real(kind=pr), intent(out) :: dH(:,:)

Homotopy Jacobian with respect to X.