subroutine Getpole(X, xtol, epsfcn) implicit none integer iopt, nprint, info, ldfjac, n integer njev, nfev, mode, maxfev, ml, mu, lr double precision fjac(450, 3), Diag(3), Qtf(3) double precision Wa1(3), Wa2(3), Wa3(3), Wa4(450) double precision X(3), Fvec(450), factor, xtol, epsfcn, r(3) double precision mpion, Mass common /mass/ mpion, Mass(2) external Det1Mvg,jac c*********************************************************************** c c call snsq searching zero of det(1-VG) for one particular channel n = 2 iopt = 2 ldfjac = 2 maxfev = 100*(n+1)*2 ml = n - 1 mu = n - 1 mode = 1 factor = 100. nprint = 1 lr = (n*(n+1))/2 call snsq(Det1Mvg, jac, iopt, n, X, Fvec, Fjac, & ldfjac, xtol, maxfev, ml, mu, epsfcn, Diag, mode, & factor, nprint, info, nfev, njev, r, lr, Qtf, & Wa1, Wa2, Wa3, Wa4) if (info .eq. 1) then write(8, 930) info, X(1)+mpion+Mass(1), X(2), & Fvec(1), Fvec(2) else write(8, 935) info endif c endif 930 format('0', 10('='), ' Final BS (POLE) Results ', 10('='), /, & 1x, 'Info = ', i4, /, & 1x, 'Re(E) = ', e12.6, 3x, 'Im(E) = ', e12.6, /, & 1x, 'Re(Det) = ', e12.6, 3x, 'Im(Det) = ', e12.6, /, & 1x, 47('=')) 935 format('0', 'Zero not fount. Info = ', i3, /, & 1x, 'See doc of snsq for more details') return end c jac is the name of the user-supplied subroutine which calculates c the jacobian. if iopt=1, then jac must be declared in an c external statement in the user calling program, and should be c written as follows. We never actually use this!!! (use iopt = 2) subroutine Jac(n,x,fvec,fjac,ldfjac,iflag) integer n,ldfjac,iflag real x(n),fvec(n),fjac(ldfjac,n) c ---------- c calculate the jacobian at x and return this c matrix in fjac. fvec contains the function c values at x and should not be altered. c ---------- return end