minpack_lmder1 Subroutine

public subroutine minpack_lmder1(fcn, m, n, x, fvec, fjac, ldfjac, tol, info, ipvt, wa, lwa, udata) bind(c)

Arguments

TypeIntentOptionalAttributesName
procedure(minpack_fcn_lmder) :: fcn
integer(kind=c_int), value:: m
integer(kind=c_int), value:: n
real(kind=c_double), intent(inout) :: x(n)
real(kind=c_double), intent(out) :: fvec(m)
real(kind=c_double), intent(out) :: fjac(ldfjac,n)
integer(kind=c_int), value:: ldfjac
real(kind=c_double), value:: tol
integer(kind=c_int), intent(out) :: info
integer(kind=c_int), intent(out) :: ipvt(n)
real(kind=c_double), intent(inout) :: wa(lwa)
integer(kind=c_int), value:: lwa
type(c_ptr), value:: udata

Calls

proc~~minpack_lmder1~~CallsGraph proc~minpack_lmder1 minpack_lmder1 proc~lmder1 lmder1 proc~minpack_lmder1->proc~lmder1 proc~lmder lmder proc~lmder1->proc~lmder proc~enorm enorm proc~lmder->proc~enorm proc~lmpar lmpar proc~lmder->proc~lmpar proc~qrfac qrfac proc~lmder->proc~qrfac proc~lmpar->proc~enorm proc~qrsolv qrsolv proc~lmpar->proc~qrsolv proc~qrfac->proc~enorm

Contents

Source Code


Source Code

    subroutine minpack_lmder1(fcn, m, n, x, Fvec, Fjac, Ldfjac, Tol, Info, Ipvt, Wa, Lwa, &
            & udata) &
            & bind(c)
        procedure(minpack_fcn_lmder) :: fcn
        integer(c_int), value :: m
        integer(c_int), value :: n
        integer(c_int), value :: ldfjac
        integer(c_int), intent(out) :: info
        integer(c_int), value :: lwa
        integer(c_int), intent(out) :: ipvt(n)
        real(c_double), value :: tol
        real(c_double), intent(inout) :: x(n)
        real(c_double), intent(out) :: fvec(m)
        real(c_double), intent(out) :: fjac(ldfjac, n)
        real(c_double), intent(inout) :: wa(lwa)
        type(c_ptr), value :: udata

        call lmder1(wrap_fcn, m, n, x, Fvec, Fjac, Ldfjac, Tol, Info, Ipvt, Wa, Lwa)

    contains
        subroutine wrap_fcn(m, n, x, fvec, fjac, ldfjac, iflag)
            integer, intent(in) :: m
            integer, intent(in) :: n
            integer, intent(in) :: ldfjac
            integer, intent(inout) :: iflag
            real(wp), intent(in) :: x(n)
            real(wp), intent(inout) :: fvec(m)
            real(wp), intent(inout) :: fjac(ldfjac, n)

            call fcn(m, n, x, fvec, fjac, ldfjac, iflag, udata)
        end subroutine wrap_fcn
    end subroutine minpack_lmder1