10.07.2015 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

implicit noneinclude ’include/egs5_h.f’include ’include/egs5_epcont.f’include ’include/egs5_stack.f’! Main EGS "header" file! COMMONs required by <strong>EGS5</strong> codecommon/geom/zboundreal*8 zbound! geom passes info to our howfar routinereal*8 tval! Local variableif (ir(np).eq.3) thenidisc=1return! Terminate this history: it is past the plate! We are in the Ta plate - check the geometryelse if (ir(np).eq.2) thenif (w(np).gt.0.0) then! Going forward - consider first since most frequent! tval is dist to boundary in this directiontval=(zbound-z(np))/w(np)if (tval.gt.ustep) thenreturn! Can take currently requested stepelseustep=tvalirnew=3returnend if! end of w(np)>0 case! Going back towards originelse if (w(np).lt.0.0) then! Distance to plane at origintval=-z(np)/w(np)if (tval.gt.ustep) thenreturn! Can take currently requested stepelseustep=tvalirnew=1returnend if! End w(np)

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

Saved successfully!

Ooh no, something went wrong!