Estimates a jacobian matrix using forward differences.
This function computes a forward-difference approximation to the N by N jacobian matrix associated with a specified problem of N functions in N variables. If the jacobian has a banded form, then function evaluations are saved by only approximating the nonzero terms.
| 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 |
Number of functions and variables |
||
| real(kind=dp), | intent(inout) | :: | x(n) |
Point where the jacobian is evaluated |
||
| real(kind=dp), | intent(in) | :: | fVec(n) |
Functions evaluated at 'x' |
||
| real(kind=dp), | intent(inout) | :: | fjac(ldfjac,n) |
The N by N approximate |
||
| integer, | intent(in) | :: | ldfjac |
Leading dimension of FJAC, which must not be less than N. |
||
| integer, | intent(in) | :: | ml |
Number of sub-diagonals within the band of the jacobian matrix If the jacobian is not banded, set ML and MU to N-1. |
||
| integer, | intent(in) | :: | mu |
Number of super-diagonals within the band of the jacobian matrix If the jacobian is not banded, set ML and MU to 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. |