nf_solver Derived Type

type, public :: nf_solver

Container to hold the state variables and user-supplied callbacks for fixpnf.


Inherits

type~~nf_solver~~InheritsGraph type~nf_solver nf_solver type~hompack_f_callbacks hompack_f_callbacks type~nf_solver->type~hompack_f_callbacks callbacks type~nf_config nf_config type~nf_solver->type~nf_config config type~nf_state nf_state type~nf_solver->type~nf_state state c_ptr c_ptr type~hompack_f_callbacks->c_ptr data type~nf_workspace nf_workspace type~nf_state->type~nf_workspace workspace

Components

Type Visibility Attributes Name Initial
integer, public :: problem_type = -100
logical, public :: initialized = .false.
type(nf_state), public :: state
type(nf_config), public :: config
type(hompack_f_callbacks), public :: callbacks

Type-Bound Procedures

procedure, public :: initialize => nf_solver_initialize

  • public function nf_solver_initialize(self, problem_type, callbacks, n, dima, config) result(status)

    This function initializes a nf_solver object for a specified problem type, user-supplied callbacks, and configuration parameters. It validates the inputs, allocates necessary state variables (deallocation included), and binds the callbacks to the solver object.

    Arguments

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

    Solver object.

    integer, intent(in) :: problem_type

    Problem type. Must be one of the following: * fix_point : solve . * zero_find : solve . * curve_track : track a zero curve of .

    type(hompack_f_callbacks), intent(in) :: callbacks

    User-supplied function and Jacobian evaluation subroutines. Required callbacks depend on problem_type as follows: * For problem_type = fix_point or zero_find, callbacks f and fjac must be provided. * For problem_type = curve_track, callbacks rho and rhojac must be provided.

    integer, intent(in) :: n

    Problem dimension, i.e., the dimension of the independent variable .

    integer, intent(in), optional :: dima

    Dimension of the parameter vector for curve-tracking problems. Required if problem_type is curve_track.

    type(nf_config), intent(in), optional :: config

    Configuration parameters. If not provided, default values are used.

    Return Value type(hompack_status)

procedure, public :: solve => nf_solver_solve

  • public function nf_solver_solve(self, x0, a) result(result)

    Arguments

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

    Solver object.

    real(kind=dp), intent(in) :: x0(:)

    Initial point for the solver. For fixed-point and zero-finding problems, this is the initial guess . For curve-tracking problems, this is the initial solution at .

    real(kind=dp), intent(in), optional :: a(:)

    Parameter vector for curve-tracking problems. Required if the solver was initialized with problem_type = curve_track.

    Return Value type(nf_result)

procedure, public :: restart => nf_solver_restart

  • public function nf_solver_restart(self) result(result)

    Arguments

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

    Solver object.

    Return Value type(nf_result)