Seeks a zero of N non-linear equations in N variables.
HYBRD finds a zero of a system of N non-linear functions in N variables by a modification of the Powell hybrid method. The user must provide a subroutine which calculates the functions.
The jacobian is then calculated by a forward-difference approximation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fSolve_t), | intent(in) | :: | obj |
External object with the user-supplied subroutine which calculates the functions. |
||
| integer, | intent(in) | :: | n |
The number of functions and variables |
||
| real(kind=dp), | intent(inout) | :: | x(n) |
Input initial estimate of the solution vector / output X final estimate of the solution vector |
||
| real(kind=dp), | intent(out) | :: | fVec(n) |
The functions evaluated at the output X |
||
| real(kind=dp), | intent(in) | :: | xTol |
Termination occurs when the relative error between two consecutive iterates is at most XTOL. XTOL should be non-negative. |
||
| integer, | intent(in) | :: | maxFev |
Termination occurs when the number of calls to FCN is at least MAXFEV by the end of an iteration |
||
| integer, | intent(in) | :: | ml |
Specify the number of sub-diagonals within the band of the jacobian matrix. If the jacobian is not banded, set ML to at least n - 1. |
||
| integer, | intent(in) | :: | mu |
Specify the number of super-diagonals within the band of the jacobian matrix. If the jacobian is not banded, set MU to at least n - 1. |
||
| real(kind=dp), | intent(in) | :: | epsFcn |
is used in determining a suitable step length for the forward-difference approximation. This approximation assumes that the relative errors in the functions are of the order of EPSFCN. If EPSFCN is less than the machine precision, it is assumed that the relative errors in the functions are of the order of the machine precision. |
||
| real(kind=dp), | intent(inout) | :: | diag(n) |
If MODE = 1, then DIAG is set internally. If MODE = 2, then DIAG must contain positive entries that serve as multiplicative scale factors for the variables. |
||
| integer, | intent(in) | :: | mode |
variables will be scaled internally. 2, scaling is specified by the input DIAG vector. |
||
| real(kind=dp), | intent(in) | :: | factor |
determines the initial step bound. This bound is set to the product of FACTOR and the euclidean norm of DIAG*X if non-zero, or else to FACTOR itself. In most cases, FACTOR should lie in the interval (0.1, 100) with 100 the recommended value. |
||
| integer, | intent(out) | :: | info |
Error flag
|
||
| integer, | intent(out) | :: | nFev |
The number of calls to FCN. produced by the QR factorization of the final approximate jacobian. |
||
| real(kind=dp), | intent(out) | :: | fjac(ldfjac,n) |
Out - N by N array which contains the orthogonal matrix Q |
||
| integer, | intent(in) | :: | ldfjac |
The leading dimension of FJAC. LDFJAC must be at least N. |
||
| real(kind=dp), | intent(out) | :: | r(lr) |
Upper triangular matrix produced by the QR factorization of the final approximate jacobian, stored row-wise. |
||
| integer, | intent(in) | :: | lr |
Size of the R array, which must be no less than (N*(N+1))/2. |
||
| real(kind=dp), | intent(out) | :: | qtf(n) |
Contains the vector Q'*FVEC. |