Skip to content

Commit

Permalink
added drift paraxial
Browse files Browse the repository at this point in the history
  • Loading branch information
Alice Bob committed Oct 11, 2024
1 parent 7102123 commit b3f7176
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/paraxial/Paraxial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ function track!(L, beamf::Beam, beam0::Beam)
@assert !(beamf === beam0) "Aliasing beamf === beam0 not allowed!"
z0 = beam0.z
zf = beamf.z
m = beam0.species.mass
β0 = ele.pc_ref/ ele.E_tot_ref

@FastGTPSA! begin
@. tilde_m = m*c_light^2/ele.pc_ref*c_light
@. et = sqrt(1.0 + tilde_m^2/(1+z0[6])^2)
@. zf[1] = z0[1]+z0[2]*L/(1.0+z0[6])
@. zf[2] = z0[2]
@. zf[3] = z0[3]+z0[4]*L/(1.0+z0[6])
Expand Down

0 comments on commit b3f7176

Please sign in to comment.