subroutine byfield(dwtp) ! Lui c this subroutine describe the applied transverse bending field c vertically traversing the cathode cavity c------------------------------------------------------------------------ c include 'constcom.h' include 'pcordcom.h' include 'tstepcom.h' c common/back/bmax,byz0,byzs,pzowmin,pzowmax,iback c----------------------------------------------------------------------- c* data itest/0/ bdis(z)=1./(1.+((z-byz0)/byzs)**2) if(bmax.eq.0.0) go to 20 if(itest.eq.0) then byc0=bmax/brhof itest=1 endif dd=dcon*dwtp bz=bgz/gamma bx=bgx/gamma byc=byc0*bdis(z) dbgx=byc*bz*dd dbgz=-byc*bx*dd bgx=bgx+dbgx bgz=bgz+dbgz 20 continue return end c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*