7.58 run_setup
- type: setup command.
- function: set global parameters of the simulation and define primary input and output files.
- Command syntax, including use of equations and subcommands, is discussed in 7.2.
&run_setup
STRING lattice = NULL;
STRING use_beamline = NULL;
STRING rootname = NULL;
STRING output = NULL;
STRING centroid = NULL;
STRING bpm_centroid = NULL;
STRING sigma = NULL;
STRING final = NULL;
STRING acceptance = NULL;
STRING losses = NULL;
long losses_include_global_coordinates = 0;
double losses_s_limit[2] = {-DBL_MAX, DBL_MAX};
STRING magnets = NULL;
STRING profile = NULL;
STRING semaphore_file = NULL;
STRING parameters = NULL;
long suppress_parameter_defaults = 0;
STRING rfc_reference_output = NULL;
long combine_bunch_statistics = 0;
long wrap_around = 1;
long final_pass = 0;
long default_order = 2;
long concat_order = 0;
long print_statistics = 0;
long show_element_timing = 0;
long monitor_memory_usage = 0;
long random_number_seed = 987654321;
long correction_iterations = 1;
double p_central = 0.0;
double p_central_mev = 0.0;
long always_change_p0 = 0;
STRING expand_for = NULL;
long tracking_updates = 1;
long echo_lattice = 0;
STRING search_path = NULL;
long element_divisions = 0;
long load_balancing_on = 0;
long back_tracking = 0;
double s_start = 0;
&end
- lattice — Name of the lattice definition file.
- echo_lattice — If nonzero, the lattice input is echoed to the standard output as the lattice
is parsed. This can help detect certain problems with the lattice that cause elegant to crash.
- use_beamline — Name of the beamline to use.
- rootname — Filename fragment used in forming complete names from incomplete filenames.
By default, the filename minus extension of the input file is used.
- output — The (incomplete) name of an SDDS file into which final phase-space coordinates
will be written. Recommended value: “%s.out”.
- centroid — The (incomplete) name of an SDDS file into which beam centroids as a function
of s will be written. Recommended value: “%s.cen”.
- bpm_centroid — The (incomplete) name of an SDDS file into which beam centroids at beam
position monitors only as a function of s will be written. Recommended value: “%s.bpmcen”.
- sigma — The (incomplete) name of an SDDS file into which the beam sigma matrix as a
function of z will be written. Recommended value: “%s.sig”. N.B.: confusion sometimes occurs
about some of the quantities related to the s coordinate in this file. Please see Section 4
above.
- final — The (incomplete) name of an SDDS file into which final beam and transport
parameters will be written. Recommended value: “%s.fin”. N.B.: confusion sometimes occurs
about some of the quantities related to the s coordinate in this file. Please see Section 4
above.
- acceptance — The (incomplete) name of an SDDS file into which the initial coordinates of
transmitted particles will be written. Recommended value: “%s.acc”.
- losses — The (incomplete) name of an SDDS file into which information on lost particles
will be written. Recommended value: “%s.lost”.
- losses_include_global_coordinates — If nonzero, the losses output file includes the
global coordinates of lost particles.
- losses_s_limit[2] — Specifies the minimum and maximum s coordinate for logging of lost
particles.
- magnets — The (incomplete) name of an SDDS file into which a magnet layout representation
will be written. Recommended value: “%s.mag”.
- magnets — The (incomplete) name of an SDDS file into which (s,ρ,K1,K2,K3) data will
be written. Recommended value: “%s.pro”.
- semaphore_file — The (incomplete) name of file that will be created just before exit from
the program, but only if no errors occured. If the file exists, it is deleted. This file can be used
to record the fact that the run completed without error.
- parameters — The (incomplete) name of an SDDS file into which parameters of accelerator
elements are written.
- suppress_parameter_defaults — If non-zero, then the parameters output file will not
contain rows for parameters whose values are identical to the then-current default values.
This can result in significantly smaller parameter files and faster loading. One downside is
that future changes to defaults would possible result in difficulty reproducing a result from
a saved parameter file. Another, more serious, risk is that the parameter file may not reflect
changes made via, e.g., alter_elements or load_parameters if those changes restore default
values for quantities that have non-default values in the lattice file. Users are warned to use
this feature with caution.
- rfc_reference_output — The (incomplete) name of an SDDS file into which the
internally-determined reference times for RFCA and RFCW elements are written. This file can
be loaded with load_parameters to exactly reproduce cavity phasing, e.g., for backtracking.
- combine_bunch_statistics — A flag indicating whether to combine statistical information
for all simulation steps. If non-zero, then the sigma and centroid data will be combined over
all simulation steps.
- wrap_around — A flag indicating whether the s coordinate should wrap-around or increase
monotonically in multipass simulations. If zero, then the centroid and sigma data is computed
for each turn with the s coordinate increasing continuously.
- final_pass — A flag indicating whether the centroid and sigma output should be computed
only from the data from the final pass. By default, the statistics include data from all passes.
- default_order — The default order of transfer matrices used for elements having matrices.
- concat_order — If non-zero, the order of matrix concatenation used. Rarely needed, but
may increase speed at the expense of accuracy.
- print_statistics — A flag indicating whether to print information as each element is
tracked. If greater than 0, information is printed after each element from the beginning of
tracking. If equal to n with n < 0, information is printed only after pass .
- show_element_timing — A flag indicating whether to collect and report execution time
statistics binned by element type.
- monitor_memory_usage — A flag indicating whether to monitor memory usage during
tracking to detect memory leaks.
- random_number_seed — A seed for the random number generators. If zero, a seed will be
generated from the system clock.
- correction_iterations — Number of iterations of orbit, tune, and chromaticity correction.
Setting this to a value larger than 1 will cause orbit, tune, and chromaticity correction to be
repeated, which improves overall convergence.
- p_central — Central momentum of the beamline, about which expansions are done. This is
βγ.
- p_central_mev — Central momentum of the beamline in MeV/c, about which expansions
are done. Ignored if p_central is nonzero.
- always_change_p0 — If nonzero, then elegant will match the reference momentum to the
beam momentum after each element. For example, in a beamline with radiation losses, one
might want to adjust downstream magnets to match the energy of the incoming beam.
- expand_for — Name of an SDDS file containing particle information, from which the central
momentum will be set. The file contents are the same as required for elegant input with the
sdds_beam namelist.
- tracking_updates — A flag indicating whether to print summary information about
tracking.
- search_path — Specify a list of pathnames in which to look for input files, including lattice
files, wakefield input, particle input, etc. This allows storing common input files in a convenient
location without having to put the location into every filename.
- element_divisions — Specify how many pieces to split elements into. Only certain elements
(basically, those with a matrix) are split. Results in creation of element_divisions new
elements having the same name as each split element.
- load_balancing_on — If 1, load-balancing is performed for parallel mode. This can result
in non-deterministic results if the load-balancing is different on two otherwise identical runs.
Load-balancing variations may occur in heterogeneous clusters, clusters with multiple users,
or for other reasons. In such situations, turning off load balancing can be useful if, for example,
one is performing parameter scans and wishes to eliminate spurious sources of variation. If
-1, then the load balance is checked and reported, but no rebalancing takes place.
- back_tracking — If nonzero, then back-tracking is performed. The beamline is reversed
in order and the beam is propagated backwards through the elements. Only a selection of
elements are supported at present, including CHARGE, CSBEND, DRIF, EDRIFT, EHCOR, EHVCOR,
EVCOR, HMON, KOCT, KQUAD, KSEXT, MARK, MONI, QUAD, RFCA, SBEN, SEXT, TRWAKE, UKICKMAP,
VMON, WAKE, and WATCH.
- s_start — The initial s coordinate. Changing this will affect not only output data (e.g.,
the s values in files from twiss_output and floor_coordinates), but also the behavior of
commands (e.g., alter_elements) the provide s-based filtering.