From 36bf795453d15863a599868a6b990a89792db735 Mon Sep 17 00:00:00 2001 From: daniau Date: Wed, 6 Feb 2008 14:57:04 +0000 Subject: [PATCH] git-svn-id: https://lxsd.femto-st.fr/svn/fvn@33 b657c933-2333-4658-acf2-d3c7c2708721 --- fvnlib.f90 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fvnlib.f90 b/fvnlib.f90 index 512a22e..baf1248 100644 --- a/fvnlib.f90 +++ b/fvnlib.f90 @@ -2127,18 +2127,18 @@ end subroutine ! subroutine fvn_z_muller (f,eps,eps1,kn,nguess,n,x,itmax,infer,ier) implicit none - double precision :: rzero,rten,rhun,rp01,ax,eps1,qz,eps,tpq + double precision :: rzero,rten,rhun,rp01,ax,eps1,qz,eps,tpq,eps1w double complex :: d,dd,den,fprt,frt,h,rt,t1,t2,t3, & tem,z0,z1,z2,bi,xx,xl,y0,y1,y2,x0, & zero,p1,one,four,p5 - + double complex, external :: f integer :: ickmax,kn,nguess,n,itmax,ier,knp1,knpn,i,l,ic, & knpng,jk,ick,nn,lm1,errcode double complex :: x(kn+n) integer :: infer(kn+n) - - + + data zero/(0.0,0.0)/,p1/(0.1,0.0)/, & one/(1.0,0.0)/,four/(4.0,0.0)/, & p5/(0.5,0.0)/, & @@ -2150,8 +2150,8 @@ subroutine fvn_z_muller (f,eps,eps1,kn,nguess,n,x,itmax,infer,ier) return end if !eps1 = rten **(-nsig) - eps1 = min(eps1,rp01) - + eps1w = min(eps1,rp01) + knp1 = kn+1 knpn = kn+n knpng = kn+nguess @@ -2199,7 +2199,7 @@ icloop: do exit icloop end if - + z2 = fprt y2 = frt ! begin main algorithm @@ -2241,7 +2241,7 @@ icloop: do h = d*h rt = rt + h ! check convergence of the first kind - if (cdabs(h) .le. eps1*max(cdabs(rt),ax)) then + if (cdabs(h) .le. eps1w*max(cdabs(rt),ax)) then if (ic .ne. 0) then exit icloop end if @@ -2289,21 +2289,21 @@ icloop: do infer(l) = jk l = l+1 end do rloop - + contains subroutine trans_rt() - tem = rten*eps1 + tem = rten*eps1w if (cdabs(rt) .gt. ax) tem = tem*rt rt = rt+tem d = (h+tem)*d/h h = h+tem end subroutine trans_rt - + subroutine deflated_work(errcode) ! errcode=0 => no errors ! errcode=1 => jk>itmax or convergence of second kind achieved integer :: errcode,flag - + flag=1 loop1: do while(flag==1) errcode=0 @@ -2334,9 +2334,9 @@ icloop: do errcode=1 return end if - + end subroutine deflated_work - + end subroutine -- 2.16.4