Skip to content

Commit

Permalink
Removed unused variable, solved issue #91 and #135 (array not large e…
Browse files Browse the repository at this point in the history
…nough to contain data), added error message for future reference
  • Loading branch information
whaeck committed Oct 28, 2019
1 parent 078b8a2 commit 715fd27
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/acepa.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module acepa
! main container array for ace data
real(kr),dimension(:),allocatable::xss
integer,parameter::nxss=999000
integer,parameter::nwscr=50000

contains

Expand All @@ -42,7 +43,7 @@ subroutine acepho(nin,nlax,nace,ndir,matd,mcnpx,iprint,itype,&
real(kr)::awn(16)
character(70)::hk
! internals
integer::nb,nw,nwscr,l,iza,idis,iinc,icoh,iabs,ipair,next
integer::nb,nw,l,iza,idis,iinc,icoh,iabs,ipair,next
integer::i,ip,ir,nr,np,iz
real(kr)::e,enext,s,v,vnext,v2,en,heat,siginc,zaid,tot
character(8)::hdt
Expand Down Expand Up @@ -70,7 +71,6 @@ subroutine acepho(nin,nlax,nace,ndir,matd,mcnpx,iprint,itype,&
jxsd=0

!--allocate scratch storage
nwscr=10000
allocate(scr(nwscr))

!--allocate main container array
Expand Down Expand Up @@ -518,7 +518,7 @@ subroutine alax(nin,nlax,matd,fluor,ener,abs,heat,a,nes)
real(kr)::a(*)
! internals
integer::loc(50)
integer::iz,nw,nb,nss,ll,iss,ntr,kk,idis,i,jj,n,mm
integer::iz,nw,nb,nss,ll,iss,ntr,idis,i,jj,n,mm
real(kr)::e,en,sig,slo,shi,ek,rhok,sum1,sum2
real(kr)::el2,pl2,el3,pl3,tot,y,phi,rholt,elav,denom
real(kr)::wt,ylt,flt,sum11,sum12,sum21,sum22,phik
Expand All @@ -545,17 +545,20 @@ subroutine alax(nin,nlax,matd,fluor,ener,abs,heat,a,nes)
ll=1
do iss=1,nss
loc(iss)=ll
if (ll.gt.nwscr) call error('alax',&
'storage exceeded for the atomic relaxation data',' ')
call listio(nlax,0,0,a(ll),nb,nw)
ntr=n2h
ll=ll+nw
do while (nb.ne.0)
if (ll.gt.nwscr) call error('alax',&
'storage exceeded for the atomic relaxation data',' ')
call moreio(nlax,0,0,a(ll),nb,nw)
ll=ll+nw
enddo
enddo

!--read in the photoionization cross section for the material
kk=ll
call openz(nin,0)
call tpidio(nin,0,0,a(ll),nb,nw)
210 call contio(nin,0,0,a(ll),nb,nw)
Expand Down

0 comments on commit 715fd27

Please sign in to comment.