36 integer i,ifile,iflag,iret,ix,nfev,njev
38 logical snglclc,convrg
42 double precision enorm,corrl,residx,wtdres
43 external getdat,
lfun,enorm,dtime,itrim,corrl,residx,wtdres
55 # access=
'sequential',form=
'formatted')
119 call lmnls(
lfun,
ndatot,
nprm,
x,
fvec,
fjac,
mxpt,
ftol,
xtol,
gtol,
128 if (.not. convrg)
then
130 write (
luout,2037) nfev,cpu
133 write (
luttyo,2037) nfev,cpu
151 write(
luout,2037) nfev,cpu
157 write(
luttyo,2037) nfev,cpu
164 write(
lutrc,2037) nfev,cpu
199 1000
format(/,2
x,70(
'-'),/)
200 1046
format(//10
x,
'Single calculation: CPU time= ',f9.3,
' sec')
202 2034
format(/2
x,
'MINPACK could not find a solution: ', a )
203 2035
format(/9
x,
'MINPACK completed: ', a/
204 # 12
x,i2,
' parameters;',i5,
' data points')
205 2036
format(10
x,
'Residual norm= ',g13.6/
206 # 10
x,
'Chi-squared=',g13.6,2
x,
'Reduced Chi-sq=',g13.6/
207 # 10
x,
'Correlation= ',f8.5,7
x,
'Residual index=',f8.5/)
208 2037
format(12
x,i4,
' function evals (CPU time: ',f9.3,
' sec)')
209 2038
format(10
x,
'No data files were specified')
221 subroutine xpack(x,n)
231 double precision x(n)
284 function wtdres( fvec, m, nspc, ixsp, npts, rmsn )
286 integer m,nspc,ixsp(nspc),npts(nspc)
287 double precision fvec(m),rmsn(nspc),wtdres
296 wtdres=wtdres+(fvec(k)/rmsn(isp))**2
double precision function wtdres(fvec, m, nspc, ixsp, npts, rmsn)
integer, dimension(mxvar), save ixst
subroutine lfun(m, n, x, fvec, fjac, ldfjac, iflag)
Subroutine for interfacing EPRLL spectral calculations with the MINPACK version of the Levenberg-Marq...
double precision, pointer, save ftol
double precision, pointer, save lb
integer, dimension(mxspc), save ixsp
void FORTRAN() uncatchc(int *flag)
double precision, dimension(mxspc), save tmpshft
double precision, dimension(mxjcol), save work2
double precision, dimension(mxspc), save shft
double precision, save rdchsq
double precision, dimension(mxspc), save spsi
double precision, dimension(nfprm, mxsite), target, save fparm
double precision, pointer, save gtol
integer, pointer, save maxev
double precision, dimension(mxpt), save work4
double precision, save fnorm
double precision, dimension(mxjcol), save qtf
integer, dimension(mxvar), save ixpr
double precision, dimension(mxspc), save sphs
character *32, dimension(0:nmnerr-1), save minerr
double precision, dimension(mxpt, mxjcol), save fjac
double precision, dimension(mxpt), save fvec
double precision, dimension(mxjcol), save gradf
integer, parameter iphase
subroutine lmnls(fcn, m, n, x, fvec, fjac, ldfjac, ftol, xtol, gtol, maxfev, maxitr, diag, scale, factor, nprint, info, nfev, njev, ipvt, qtf, gnvec, gradf, wa1, wa2, wa3, wa4)
(L)evenberg-(M)arquardt (N)onlinear (L)east (S)quares This is a modification of the original lmder su...
void FORTRAN() catchc(int *flag)
double precision, pointer, save xtol
character *30, save trname
double precision, dimension(mxjcol), save diag
integer, parameter luttyo
double precision, dimension(mxjcol), save work1
double precision, dimension(mxspc), save sb0
double precision, dimension(mxspc), save rmsn
double precision, dimension(mxjcol), save gnvec
integer, dimension(mxspc), save npts
integer, pointer, save maxitr
double precision, dimension(mxspc), save slb
double precision, dimension(mxjcol), save work3
double precision, dimension(mxvar), save prscl
double precision, save chisqr
double precision, dimension(mxjcol), save x