nonlin_multi_eqn_mult_var Module



Interfaces

interface

  • public subroutine jacobianfcn(x, jac, args)

    Describes a routine capable of computing the Jacobian matrix of M functions of N unknowns.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: x

    An N-element array containing the independent variables.

    real(kind=real64), intent(out), dimension(:,:) :: jac

    An M-by-N matrix where the Jacobian will be written.

    class(*), intent(inout), optional :: args

    An optional argument to allow the user to communicate with the routine.

interface

  • public subroutine nonlin_solver(this, fcn, x, fvec, ib, args)

    Describes the interface of a nonlinear equation solver.

    Arguments

    Type IntentOptional Attributes Name
    class(equation_solver), intent(inout) :: this

    The equation_solver-based object.

    class(vecfcn_helper), intent(in) :: fcn

    The vecfcn_helper object containing the equations to solve.

    real(kind=real64), intent(inout), dimension(:) :: x

    On input, an N-element array containing an initial estimate to the solution. On output, the updated solution estimate. N is the number of variables.

    real(kind=real64), intent(out), dimension(:) :: fvec

    An M-element array that, on output, will contain the values of each equation as evaluated at the variable values given in x.

    type(iteration_behavior), optional :: ib

    An optional output, that if provided, allows the caller to obtain iteration performance statistics.

    class(*), intent(inout), optional :: args

    An optional argument to allow the user to communicate with the routine.

interface

  • public subroutine vecfcn(x, f, args)

    Describes an M-element vector-valued function of N-variables.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: x

    An N-element array containing the independent variables.

    real(kind=real64), intent(out), dimension(:) :: f

    An M-element array that, on output, contains the values of the M functions.

    class(*), intent(inout), optional :: args

    An optional argument to allow the user to communicate with the routine.


Derived Types

type, public, abstract ::  equation_solver

A base class for various solvers of nonlinear systems of equations.

Type-Bound Procedures

procedure, public :: get_fcn_tolerance => es_get_fcn_tol
procedure, public :: get_gradient_tolerance => es_get_grad_tol
procedure, public :: get_max_fcn_evals => es_get_max_eval
procedure, public :: get_print_status => es_get_print_status
procedure, public :: get_var_tolerance => es_get_var_tol
procedure, public :: set_fcn_tolerance => es_set_fcn_tol
procedure, public :: set_gradient_tolerance => es_set_grad_tol
procedure, public :: set_max_fcn_evals => es_set_max_eval
procedure, public :: set_print_status => es_set_print_status
procedure, public :: set_var_tolerance => es_set_var_tol
procedure(nonlin_solver), public, deferred, pass :: solve

type, public ::  vecfcn_helper

Defines a type capable of encapsulating a system of nonlinear equations of the form: F(X) = 0. This type is used to establish the system of equations to solve, and provides a means for computing the Jacobian matrix for the system of equations, and any other ancillary operations that may be needed by the solver.

Type-Bound Procedures

procedure, public :: fcn => vfh_fcn
procedure, public :: get_equation_count => vfh_get_nfcn
procedure, public :: get_variable_count => vfh_get_nvar
procedure, public :: is_fcn_defined => vfh_is_fcn_defined
procedure, public :: is_jacobian_defined => vfh_is_jac_defined
procedure, public :: jacobian => vfh_jac_fcn
procedure, public :: set_fcn => vfh_set_fcn
procedure, public :: set_jacobian => vfh_set_jac