diff --git a/src/dispersion.f90 b/src/dispersion.f90 index 7cec6d0..832bc31 100644 --- a/src/dispersion.f90 +++ b/src/dispersion.f90 @@ -595,7 +595,7 @@ subroutine diel_tens_fr(xg,yg,mu,npl,e330,cr,ci,epsl,lrm,fast) integer :: n,m,ih,i,k,n1,nn,llm,neval,ier,last,ihmin integer, dimension(liw) :: iw real(dp) :: mu2,mu4,mu6,npl2,dt,bth,bth2,bth4,bth6 - real(dp) :: t,x,s,sy1,sy2,sy3,resfh,epp + real(dp) :: t,x,s,sy1,sy2,sy3,resfh,epp,tmaxr real(dp), dimension(lw) :: w real(dp), dimension(npar) :: apar ! @@ -618,6 +618,7 @@ subroutine diel_tens_fr(xg,yg,mu,npl,e330,cr,ci,epsl,lrm,fast) n1=1 if(fast.gt.10) n1=-llm ! + tmaxr = real(tmax,dp) apar(1) = yg apar(2) = mu apar(3) = npl @@ -625,14 +626,15 @@ subroutine diel_tens_fr(xg,yg,mu,npl,e330,cr,ci,epsl,lrm,fast) ! do n=n1,llm nn=abs(n) + apar(5) = real(n,dp) do m=nn,llm - apar(5) = real(n,dp) apar(6) = real(m,dp) + ihmin=0 if(n.eq.0.and.m.eq.0) ihmin=2 do ih=ihmin,2 apar(7) = real(ih,dp) ! call dqagi(fhermit,bound,2,epsa,epsr,resfh, - call dqagsmv(fhermit,-tmax,tmax,apar,npar,epsa,epsr,resfh, & + call dqagsmv(fhermit,-tmaxr,tmaxr,apar,npar,epsa,epsr,resfh, & epp,neval,ier,liw,lw,last,iw,w) rr(n,ih,m) = resfh end do