nonlin 1.5.2
A library that provides routines to compute the solutions to systems of nonlinear equations.
|
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. More...
Public Member Functions | |
procedure, public | set_fcn vfh_set_fcn |
Establishes a pointer to the routine containing the system of equations to solve. | |
procedure, public | set_jacobian vfh_set_jac |
Establishes a pointer to the routine for computing the Jacobian matrix of the system of equations. If no routine is defined, the Jacobian matrix will be computed numerically (this is the default state). | |
procedure, public | is_fcn_defined vfh_is_fcn_defined |
Tests if the pointer to the subroutine containing the system of equations to solve has been assigned. | |
procedure, public | is_jacobian_defined vfh_is_jac_defined |
Tests if the pointer to the subroutine containing the system of equations to solve has been assigned. | |
procedure, public | fcn vfh_fcn |
Executes the routine containing the system of equations to solve. No action is taken if the pointer to the subroutine has not been defined. | |
procedure, public | jacobian vfh_jac_fcn |
Executes the routine containing the Jacobian matrix if supplied. If not supplied, the Jacobian is computed via finite differences. | |
procedure, public | get_equation_count vfh_get_nfcn |
Gets the number of equations in this system. | |
procedure, public | get_variable_count vfh_get_nvar |
Gets the number of variables in this system. | |
Public Attributes | |
integer(int32) | m_nfcn = 0 |
The number of functions in m_fcn. | |
integer(int32) | m_nvar = 0 |
The number of variables in m_fcn. | |
Static Public Attributes | |
procedure(jacobianfcn), pointer, nopass | m_jac => null() |
A pointer to the jacobian routine - null if no routine is supplied. | |
Static Private Attributes | |
procedure(vecfcn), pointer, nopass | m_fcn => null() |
A pointer to the target vecfcn routine. | |
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.
Definition at line 339 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::fcn |
Executes the routine containing the system of equations to solve. No action is taken if the pointer to the subroutine has not been defined.
[in] | this | The vecfcn_helper object. |
[in] | x | An N-element array containing the independent variables. |
[out] | f | An M-element array that, on output, contains the values of the M functions. |
Definition at line 522 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::get_equation_count |
Gets the number of equations in this system.
[in] | this | The vecfcn_helper object. |
Definition at line 567 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::get_variable_count |
Gets the number of variables in this system.
[in] | this | The vecfcn_helper object. |
Definition at line 577 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::is_fcn_defined |
Tests if the pointer to the subroutine containing the system of equations to solve has been assigned.
[in] | this | The vecfcn_helper object. |
Definition at line 497 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::is_jacobian_defined |
Tests if the pointer to the subroutine containing the system of equations to solve has been assigned.
[in] | this | The vecfcn_helper object. |
Definition at line 508 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::jacobian |
Executes the routine containing the Jacobian matrix if supplied. If not supplied, the Jacobian is computed via finite differences.
[in] | this | The vecfcn_helper object. |
[in] | x | An N-element array containing the independent variabls defining the point about which the derivatives will be calculated. |
[out] | jac | An M-by-N matrix where, on output, the Jacobian will be written. |
[in] | fv | An optional M-element array containing the function values at x . If not supplied, the function values are computed at x . |
[out] | work | An optional input, that if provided, prevents any local memory allocation. If not provided, the memory required is allocated within. If provided, the length of the array must be at least olwork . Notice, a workspace array is only utilized if the user does not provide a routine for computing the Jacobian. |
[out] | olwork | An optional output used to determine workspace size. If supplied, the routine determines the optimal size for work , and returns without performing any actual calculations. |
[out] | err | An optional integer output that can be used to determine error status. If not used, and an error is encountered, the routine simply returns silently. If used, the following error codes identify error status:
|
Definition at line 557 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::set_fcn |
Establishes a pointer to the routine containing the system of equations to solve.
[in,out] | this | The vecfcn_helper object. |
[in] | fcn | The function pointer. |
[in] | nfcn | The number of functions. |
[in] | nvar | The number of variables. |
Definition at line 410 of file nonlin_core.f90.
procedure, public nonlin_core::vecfcn_helper::set_jacobian |
Establishes a pointer to the routine for computing the Jacobian matrix of the system of equations. If no routine is defined, the Jacobian matrix will be computed numerically (this is the default state).
[in,out] | this | The vecfcn_helper object. |
[in] | jac | The function pointer. |
Definition at line 486 of file nonlin_core.f90.
|
staticprivate |
A pointer to the target vecfcn routine.
Definition at line 342 of file nonlin_core.f90.
|
static |
A pointer to the jacobian routine - null if no routine is supplied.
Definition at line 344 of file nonlin_core.f90.
integer(int32) nonlin_core::vecfcn_helper::m_nfcn = 0 |
The number of functions in m_fcn.
Definition at line 346 of file nonlin_core.f90.
integer(int32) nonlin_core::vecfcn_helper::m_nvar = 0 |
The number of variables in m_fcn.
Definition at line 348 of file nonlin_core.f90.