fdJac1 Subroutine

private subroutine fdJac1(obj, n, x, fVec, fjac, ldfjac, ml, mu, epsFcn)

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.

Arguments

Type IntentOptional 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.


Calls

proc~~fdjac1~~CallsGraph proc~fdjac1 fdJac1 fcn fcn proc~fdjac1->fcn

Called by

proc~~fdjac1~~CalledByGraph proc~fdjac1 fdJac1 proc~hybrd hybrd proc~hybrd->proc~fdjac1 proc~fsolve fsolve proc~fsolve->proc~hybrd proc~solve_junction solve_junction proc~solve_junction->proc~fsolve proc~junction_resolution_from_and_to_ports Junction_resolution_from_and_to_ports proc~junction_resolution_from_and_to_ports->proc~solve_junction proc~main_loop main_loop proc~main_loop->proc~junction_resolution_from_and_to_ports program~reims_p reims_p program~reims_p->proc~main_loop