using BeamTracking
using Beamlines
@eles begin
q = Drift(L = 1, tracking_method = Exact())
end
bb = Beamline([q], R_ref = -1e7, species_ref = Species("electron"))
v1 = [0.0 0.0 0.0 0.0 0.0 0.0]
b1 = Bunch(deepcopy(v1), species=Species("electron"), R_ref = -1e7)
track!(b1, q)
println(b1.coords.v)
b2 = Bunch(deepcopy(v1), species=Species("electron"), R_ref = 1e7)
track!(b2, q)
println(b2.coords.v)
julia> include("local/z.jl")
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 NaN 0.0]
Test program:
Output is: