nf_state Derived Type

type, public :: nf_state

State variables for fixpnf.


Inherits

type~~nf_state~~InheritsGraph type~nf_state nf_state type~nf_workspace nf_workspace type~nf_state->type~nf_workspace workspace

Inherited by

type~~nf_state~~InheritedByGraph type~nf_state nf_state type~nf_solver nf_solver type~nf_solver->type~nf_state state

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: abserr = zero

Absolute error tolerance.

real(kind=dp), public :: relerr = zero

Relative error tolerance.

real(kind=dp), public :: curtol = zero

Curvature-based error tolerance.

real(kind=dp), public :: h = zero

Optimal step size for the next step to be attempted by stepnf.

real(kind=dp), public :: hold = zero

||yp - ypold|| at the previous step.

real(kind=dp), public :: s = zero

Total arc length of the solution path followed by the algorithm.

integer, public :: iflag = -100

Problem type and status flag.

integer, public :: limit = -100

Limit on the number of steps allowed in the main loop of fixpnf.

integer, public :: n = 0

Problem dimension.

integer, public :: nfe = 0

Number of homotopy/Jacobian evaluations performed. This counter is incremented once for each call to tangnf, where the homotopy map and its Jacobian are assembled and used to compute a tangent vector and Newton correction.

logical, public :: start = .true.

Flag to indicate the first call to stepnf.

logical, public :: crash = .false.

Flag to indicate that the return state of stepnf is a crash.

real(kind=dp), public, allocatable :: a(:)

Parameter vector for curve-tracking problems, or initial point for the fixed-point and zero-finding problems.

real(kind=dp), public, allocatable :: y(:)

Current point on the zero curve.

real(kind=dp), public, allocatable :: yold(:)

Previous point found on the zero curve.

real(kind=dp), public, allocatable :: yp(:)

Unit tangent vector to the zero curve at y.

real(kind=dp), public, allocatable :: ypold(:)

Unit tangent vector to the zero curve at yold.

type(nf_workspace), public :: workspace

Linear-algebra workspace.


Type-Bound Procedures

procedure, public :: alloc => alloc_state

  • public pure subroutine alloc_state(self, n, dima, stat)

    Initializes nf_state, i.e., (re)allocates all allocatable arrays and sets them to zero.

    Arguments

    Type IntentOptional Attributes Name
    class(nf_state), intent(inout) :: self

    State object.

    integer, intent(in) :: n

    Problem dimension.

    integer, intent(in) :: dima

    Dimension of the parameter vector a.

    integer, intent(out), optional :: stat

    Error status of the allocation.