NLSL
l1pfun.f90
Go to the documentation of this file.
1 c NLSL Version 1.5b 11/5/95
2 c----------------------------------------------------------------------
3 c =========================
4 c function L1PFUN
5 c =========================
6 c
7 c Single-parameter function for minimization of experimental-calc'd
8 c residuals using Brent's method minimization.
9 c
10 c----------------------------------------------------------------------
11  function l1pfun( parm, bflag )
12 c
13  use nlsdim
14  use parcom
15  use expdat
16  use iterat
17  use lmcom
18 c
19  implicit none
20  double precision l1pfun,parm(1)
21  integer bflag,isp,tmpflg
22 c
23  integer IPRINT
24  double precision ZERO
25  parameter(iprint=0,zero=0.0d0)
26 c
27  double precision enorm
28  external enorm
29 c
30  iter=iter+1
31  call lfun(ndatot,1,parm,fvec,fjac,mxpt,bflag)
32  fnorm=enorm(ndatot,fvec)
33 
34 c -------------------------------------------
35 c Update shifts when a new minimum is found
36 c -------------------------------------------
37  if (fnorm.lt.fnmin) then
38  fnmin=fnorm
39  do isp=1,nspc
40  shft(isp)=shft(isp)+tmpshft(isp)
41  tmpshft(isp)=zero
42  end do
43  end if
44 
45  tmpflg=iprint
46  call lfun(ndatot,1,parm,fvec,fjac,mxpt,tmpflg)
47 c
48  l1pfun=fnorm
49 c
50  return
51  end
integer, parameter mxpt
Definition: nlsdim.f90:39
subroutine lfun(m, n, x, fvec, fjac, ldfjac, iflag)
Subroutine for interfacing EPRLL spectral calculations with the MINPACK version of the Levenberg-Marq...
Definition: lfun.f90:68
integer, save ndatot
Definition: expdat.f90:45
double precision, dimension(mxspc), save tmpshft
Definition: expdat.f90:40
double precision, save fnmin
Definition: iterat.f90:15
integer, save iter
Definition: iterat.f90:14
double precision, dimension(mxspc), save shft
Definition: expdat.f90:40
double precision, save fnorm
Definition: iterat.f90:15
integer, save nspc
Definition: expdat.f90:45
double precision, dimension(mxpt, mxjcol), save fjac
Definition: lmcom.f90:17
double precision, dimension(mxpt), save fvec
Definition: lmcom.f90:17
Definition: lmcom.f90:13
double precision function l1pfun(parm, bflag)
Definition: l1pfun.f90:12