Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce sim.track_particles() #741

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/source/usage/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ Collective Effects & Overall Simulation Parameters

.. py:method:: evolve()

Run the main simulation loop for a number of steps.
Run the main simulation loop (deprecated, use ``track_particles``)

.. py:method:: track_particles()

Run the particle tracking simulation loop.

.. py:method:: resize_mesh()

Expand Down
2 changes: 1 addition & 1 deletion examples/achromatic_spectrometer/run_spectrometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/alignment/run_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
sim.lattice.extend(lattice)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/aperture/run_aperture.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/apochromatic/run_apochromatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
sim.lattice.extend(lattice_line)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/apochromatic/run_apochromatic_pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
sim.lattice.extend(lattice_line)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cfbend/run_cfbend.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
sim.lattice.extend(bend)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cfbend/run_cfbend_madx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
sim.lattice.load_file("chicane.madx", nslice=25)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cfchannel/run_cfchannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cfchannel/run_cfchannel_10nC_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cfchannel/run_cfchannel_10nC_mlmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/chicane/run_chicane.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/chicane/run_chicane_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/chicane/run_chicane_madx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
sim.lattice.load_file("chicane.madx", nslice=25)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/compression/run_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/coupled_optics/run_coupled_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/cyclotron/run_cyclotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
sim.periods = 150

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/distgen/run_gaussian_twiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/distgen/run_kurth4d.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
sim.lattice.extend(constf)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/distgen/run_kvdist_twiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/distgen/run_semigaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/dogleg/run_dogleg.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/epac2004_benchmarks/run_bithermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/epac2004_benchmarks/run_fodo_rf_SC.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/epac2004_benchmarks/run_thermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/expanding_beam/run_expanding_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
sim.lattice.extend([monitor, elements.Drift(name="d1", ds=6.0, nslice=40), monitor])

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/expanding_beam/run_expanding_mlmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
sim.lattice.extend([monitor, elements.Drift(name="d1", ds=6.0, nslice=40), monitor])

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo/run_fodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo/run_fodo_madx.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
sim.lattice.load_file("fodo.madx", nslice=25)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo/run_fodo_twiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo_channel/run_fodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
sim.periods = 101

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo_chromatic/run_fodo_chr.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo_programmable/run_fodo_programmable.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def my_ref_drift(pge, refpart):
sim.lattice.extend(fodo)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo_rf/run_fodo_rf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
sim.lattice.append(monitor)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/fodo_tune/run_fodo_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
sim.periods = 100

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
del sim
Expand Down
2 changes: 1 addition & 1 deletion examples/initialize_from_array/run_from_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
]
)

sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/iota_lattice/run_iotalattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
sim.periods = 5

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/iota_lattice/run_iotalattice_sdep.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
sim.periods = 5

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/iota_lens/run_iotalens.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
sim.lattice.extend(nllens_lattice)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/iota_lens/run_iotalens_sdep.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
sim.periods = 1

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/kicker/run_hvkicker_madx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
sim.lattice.load_file("hvkicker.madx", nslice=1)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/kicker/run_kicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
sim.lattice.extend(kicklattice)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/kicker/run_kicker_madx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
sim.lattice.load_file("kicker.madx", nslice=1)

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
2 changes: 1 addition & 1 deletion examples/kurth/run_kurth_10nC_periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
sim.lattice.extend([monitor, drift1, constf1, drift1, monitor])

# run simulation
sim.evolve()
sim.track_particles()

# clean shutdown
sim.finalize()
Loading
Loading