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.
Executes the routine containing the system of equations to solve. No action is taken if the pointer to the subroutine has not been defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
||
| 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. |
Gets the number of equations in this system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
The function count.
Gets the number of variables in this system.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
The number of variables.
Tests if the pointer to the subroutine containing the system of equations to solve has been assigned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
Returns true if the pointer has been assigned; else, false.
Tests if the pointer to the Jacobian calculation routine has been defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
Returns true if the pointer has been assigned; else, false.
Executes the routine containing the Jacobian matrix if supplied. If not supplied, the Jacobian is computed via finite differences.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(in) | :: | this |
The vecfcn_helper object. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
An N-element array containing the independent variables defining the point about which the derivatives will be calculated. |
|
| real(kind=real64), | intent(out), | dimension(:,:) | :: | jac |
An M-by-N matrix where, on output, the Jacobian will be written. |
|
| real(kind=real64), | intent(in), | optional, | dimension(:), target | :: | fv |
An optional M-element array containing the function values at x. If not supplied, the function values are computed at x. |
| class(*), | intent(inout), | optional | :: | args |
An optional argument to allow the user to communicate with the routine. |
Establishes a pointer to the routine containing the system of equations to solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(inout) | :: | this |
The vecfcn_helper object. |
||
| procedure(vecfcn), | intent(in), | pointer | :: | fcn |
The function pointer. |
|
| integer(kind=int32), | intent(in) | :: | nfcn |
The number of functions. |
||
| integer(kind=int32), | intent(in) | :: | nvar |
The number of variables. |
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).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vecfcn_helper), | intent(inout) | :: | this |
The vecfcn_helper object. |
||
| procedure(jacobianfcn), | intent(in), | pointer | :: | jac |
The function pointer. |