41 parameter(maxdivols=20000)
42 integer nvol, nrotm, nmate, ntmed, nset, i, jma, nmixt, k, nin,
43 > jdiv, jd, iaxis, ivo, ndiv, numed, npar, natt, ivol, jin,
44 > nparv, npard, nr, irot, konly, nwbuf, isvol, nmat, ifield,
45 > nbits(5000), idtyp, nwhi, nwdi, iset, idet, j,
in, jmx,
46 > jdh, jdd, jdu, ndet, nn, nupar, npos, ndvol, ndivols, ii,
47 > npositioned, iia(10000), imate, smixt
49 real c0, step,
x,
y,
z,
a, dens, radl, absl, fact(5000),
50 > fieldm, tmaxfd, stemax, deemax, epsil, stmin, orig(5000),
53 character shape*4,
name*4, dname*4, chonly*4, chmat*20, chtmed*20,
54 > chset*4, chdet*4, chnms(5000)*4, divols(maxdivols)*4
60 print *,
'Materials: ',nmate
64 call uhtoc(iq(jma+1),4,chmat,20)
75 write(6,101) imate, chmat,
a,
z, dens, radl, absl
76 call
ksmate(ii, chmat,
a,
z, dens, radl, absl,
80 write(6,102) imate, chmat,
a,
z, dens, radl, absl,
81 > (j,q(jmx+j),q(jmx+nmixt+j),q(jmx+2*nmixt+j),
83 call
ksmixt(ii, chmat, q(jmx+1), q(jmx+nmixt+1),
84 > dens, smixt, q(jmx+2*nmixt+1))
88 101
format(1
x,i5,1
x,a12,f6.2,f5.1,f8.2,2f9.2)
89 102
format(1
x,i5,1
x,a12,f6.2,f5.1,f8.2,2f9.2,1
x,i2, f6.2, f5.1,
90 > f6.2/(57
x, i2, f6.2, f5.1, f6.2))
94 print *,
'Media: ',ntmed
98 call uhtoc(iq(j+1),4,chtmed,20)
109 call
kstmed(ii,chtmed,nmat,isvol,ifield,fieldm,tmaxfd,stemax,
110 + deemax,epsil,stmin,q(j+15),nwbuf)
115 print *,
'Rotms: ',nrotm
119 call
ksrotm(ii,q(j+11),q(j+12),q(j+13),q(j+14),q(j+15),q(j+16))
125 print *,
'Volumes: ',nvol
136 call uhtoc(iq(jvolum+ivo),4,dname,4)
138 if (ndivols.gt.maxdivols)
then
141 +
'!!!ERROR!!! ndivols array exhausted. ',
142 +
'Too many divisions.'
144 divols(ndivols) = dname
152 call uhtoc(iq(jvolum+ii),4,
name,4)
159 if (divols(k).eq.
name)
then
165 call
ksvolu(
name, shape, numed, q(j+7), npar, ivol)
168 print *,
'Divided volumes: ',ndvol
171 call uhtoc(iq(jvolum+1),4,
name,4)
174 print *,
'mother volume: ',
name,
' shape: ',shape
179 call uhtoc(iq(jvolum+ii),4,
name,4)
188 call uhtoc(iq(jvolum+ivo),4,dname,4)
194 call
ksdvn2(dname,
name, ndiv, iaxis, c0, numed)
195 else if (nin.gt.0)
then
200 call uhtoc(iq(jvolum+ivo),4,dname,4)
215 npositioned = npositioned +1
230 print *,
'Sets: ',nset
234 call uhtoc(iq(jset+i),4,chset,4)
238 call uhtoc(iq(j+k),4,chdet,4)
239 call gfdet(chset, chdet, nn, chnms, nbits, idtyp,
240 + nwhi, nwdi, iset, idet)
241 call
ksdet(chset, chdet, nn, chnms, nbits, idtyp,
242 + nwhi, nwdi, iset, idet)
245 call gfdeth(chset,chdet,nn,chnms,nbits,orig,fact)
246 call
ksdeth(chset,chdet,nn,chnms,nbits,orig,fact)
250 call gfdetd(chset,chdet,nn,chnms,nbits)
251 call
ksdetd(chset,chdet,nn,chnms,nbits)
255 call gfdetu(chset,chdet,100,nupar,upar)
256 call
ksdetu(chset,chdet,nupar,upar)
260 print *,
'Positioned volumes (gspos, gsposp):',npositioned
270 #include "gcbank.inc"
271 integer i, link, nbanks, iia(*)
274 if (link.eq.0)
return
278 if(lq(link-i).ne.0)
then