File indexing completed on 2024-04-06 12:13:31
0001
0002
0003
0004
0005
0006 subroutine initmixgrade
0007 implicit double precision(a-h, o-z)
0008 implicit integer(i-n)
0009
0010 #include "invegas.h"
0011 #include "bcvegpy_set_par.inc"
0012
0013 common/mixevnt/xbcsec(8),imix,imixtype
0014 common/mixevnt2/xbcsum,ibclimit
0015 common/grade/xi(NVEGBIN,10)
0016 common/counter/ibcstate,nev
0017 common/loggrade/ievntdis,igenerate,ivegasopen,igrade
0018 logical usegrade,usevegas
0019
0020 usegrade=.false.
0021 if(igrade.eq.1) usegrade=.true.
0022 usevegas=.false.
0023 if(ivegasopen.eq.1) usevegas=.true.
0024
0025
0026
0027
0028 if(imixtype.eq.1.or.imixtype.eq.2) ibcstate=0
0029 if(imixtype.eq.3) ibcstate=2
0030
0031 ranbc=xbcsum*pyr(0)
0032 55 ibcstate=ibcstate+1
0033 ranbc =ranbc-xbcsec(ibcstate)
0034 if(ibcstate.lt.ibclimit .and. ranbc.gt.1.0d-16) go to 55
0035
0036
0037 if(ibcstate.eq.1 .or. ibcstate.eq.2) then
0038 call paraswave(ibcstate)
0039 end if
0040 if(ibcstate.gt.2 .and. ibcstate.lt.7) then
0041 call parapwave
0042 end if
0043 if(ibcstate.eq.7 .or. ibcstate.eq.8) then
0044 call paraswave(ibcstate)
0045 end if
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 if((.not. usevegas) .and. (.not. usegrade)) then
0057
0058 ndim=7 ! fix for uninizialized variable
0059 rc=1.0d0/NVEGBIN
0060 do 77 j=1,ndim
0061 xi(NVEGBIN,j)=1.0d0
0062 dr=0.0d0
0063 do 77 i=1,NVEGBIN-1
0064 dr=dr+rc
0065 xi(i,j)=dr
0066 77 continue
0067 if(ibcstate.eq.7) ibcstate=1
0068 if(ibcstate.eq.8) ibcstate=2
0069 return
0070 end if
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 if(ibcstate.eq.1) then
0081 do i=1,NVEGBIN
0082 read(36,*) (xi(i,j),j=1,7)
0083 end do
0084 rewind(36)
0085 end if
0086
0087
0088 if(ibcstate.eq.2) then
0089 do i=1,NVEGBIN
0090 read(37,*) (xi(i,j),j=1,7)
0091 end do
0092 rewind(37)
0093 end if
0094
0095
0096 if(ibcstate.eq.3) then
0097 do i=1,NVEGBIN
0098 read(38,*) (xi(i,j),j=1,7)
0099 end do
0100 rewind(38)
0101 end if
0102
0103
0104 if(ibcstate.eq.4) then
0105 do i=1,NVEGBIN
0106 read(39,*) (xi(i,j),j=1,7)
0107 end do
0108 rewind(39)
0109 end if
0110
0111
0112 if(ibcstate.eq.5) then
0113 do i=1,NVEGBIN
0114 read(46,*) (xi(i,j),j=1,7)
0115 end do
0116 rewind(46)
0117 end if
0118
0119
0120 if(ibcstate.eq.6) then
0121 do i=1,NVEGBIN
0122 read(47,*) (xi(i,j),j=1,7)
0123 end do
0124 rewind(47)
0125 end if
0126
0127
0128 if(ibcstate.eq.7) then
0129 ibcstate=1 !1s0 and color-octet
0130 do i=1,NVEGBIN
0131 read(48,*) (xi(i,j),j=1,7)
0132 end do
0133 rewind(48)
0134 end if
0135
0136
0137 if(ibcstate.eq.8) then
0138 ibcstate=2 !3s1 and color-octet
0139 do i=1,NVEGBIN
0140 read(49,*) (xi(i,j),j=1,7)
0141 end do
0142 rewind(49)
0143 end if
0144 end