12.07.2015 Views

cg Version

cg Version

cg Version

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

! -----------------------------------------------------------! Keep track of energy deposition (for conservation purposes)! -----------------------------------------------------------if (iarg .lt. 5) thenesum(iql+2,irl,iarg+1) = esum(iql+2,irl,iarg+1) + edepwtnsum(iql+2,irl,iarg+1) = nsum(iql+2,irl,iarg+1) + 1end if! -----------------------------------------------------------------! Print out particle transport information (if switch is turned on)! -----------------------------------------------------------------! ========================if (iwatch .gt. 0) call swatch(iarg,iwatch)! ========================if(iarg .ge. 5) return! ----------------------------------------------! Score energy deposition inside NaI detector! ----------------------------------------------if (med(irl) .eq. 1) thendepe = depe + edepwt! ----------------------------------------------------! Score particle information if it enters from outside! ----------------------------------------------------if (irl .ne. irold .and. iarg .eq. 0) thenif (iql .eq. 0) then! photonntype=1ie = e(np)/deltae +1if(ie .gt. 50) ie = 50elseif (iql .eq. -1) then ! electronntype=2ie = (e(np) - RM)/deltae +1if(ie .gt. 50) ie = 50else! positronntype=3ie = (e(np) - RM)/deltae +1if(ie .gt. 50) ie = 50end ifspec(ntype,ie) = spec(ntype,ie) + wt(np)end ifend if! ----------------------------------------------------------------! Print out stack information (for limited number cases and lines)! ----------------------------------------------------------------if (ncount .le. nwrite .and. ilines .le. nlines) thenilines = ilines + 1write(6,100) e(np),x(np),y(np),z(np),u(np),v(np),w(np),* iql,irl,iarg100 FORMAT(4G15.7/3G15.7,3I5)end if! ------------------------------------! Output particle information for plot! ------------------------------------if (ncount.le.maxpict) thencall plotxyz(iarg,np,iq(np),x(np),y(np),z(np),e(np),ir(np),* wt(np),time(np))end ifreturnend3.10 Subroutine howfarAs far as CG is used, it is not necessary for user to change subroutine howfar atall.For user's convenience, outline of subroutine howfar is described. At subroutine howfar,39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!