minpack_lmdif1 Subroutine

public subroutine minpack_lmdif1(fcn, m, n, x, fvec, tol, info, iwa, wa, lwa, udata) bind(c)

Arguments

TypeIntentOptionalAttributesName
procedure(minpack_func2) :: 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(inout) :: fvec(m)
real(kind=c_double), value:: tol
integer(kind=c_int), intent(out) :: info
integer(kind=c_int), intent(inout) :: iwa(n)
real(kind=c_double), intent(inout) :: wa(lwa)
integer(kind=c_int), value:: lwa
type(c_ptr), value:: udata

Calls

proc~~minpack_lmdif1~~CallsGraph proc~minpack_lmdif1 minpack_lmdif1 proc~lmdif1 lmdif1 proc~minpack_lmdif1->proc~lmdif1 proc~lmdif lmdif proc~lmdif1->proc~lmdif proc~enorm enorm proc~lmdif->proc~enorm proc~lmpar lmpar proc~lmdif->proc~lmpar proc~fdjac2 fdjac2 proc~lmdif->proc~fdjac2 proc~qrfac qrfac proc~lmdif->proc~qrfac proc~lmpar->proc~enorm proc~qrsolv qrsolv proc~lmpar->proc~qrsolv proc~qrfac->proc~enorm

Contents

Source Code


Source Code

    subroutine minpack_lmdif1(fcn, m, n, x, fvec, tol, info, iwa, wa, lwa, udata) &
            & bind(c)
        procedure(minpack_func2) :: fcn
        integer(c_int), value :: m
        integer(c_int), value :: n
        integer(c_int), intent(out) :: info
        integer(c_int), value :: lwa
        integer(c_int), intent(inout) :: iwa(n)
        real(c_double), value :: tol
        real(c_double), intent(inout) :: x(n)
        real(c_double), intent(inout) :: fvec(m)
        real(c_double), intent(inout) :: wa(lwa)
        type(c_ptr), value :: udata

        call lmdif1(wrap_fcn, m, n, x, fvec, tol, info, iwa, wa, lwa)

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

            call fcn(m, n, x, fvec, iflag, udata)
        end subroutine wrap_fcn
    end subroutine minpack_lmdif1