The use of vary_element

Moderators: cyao, michael_borland

Post Reply
CCH
Posts: 16
Joined: 16 Apr 2010, 02:04

The use of vary_element

Post by CCH » 13 May 2010, 02:54

Hello,
I'm trying to do a tracking,but I'm confused about command vary_element .Can you tell me what is the difference between vary_element and alter_elements and what is it used for? what's the meaning of index in vary_element?

-------------------CCH

michael_borland
Posts: 1959
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: The use of vary_element

Post by michael_borland » 13 May 2010, 16:23

vary_element is used when you want to vary one or more parameters of one or more elements in a loop. Actually, one can use multi-dimensional (i.e., nested) loops. The index_number parameter is used to identify which loop index a particular vary_element statement is tied to. There are a number of examples in the on-line examples file of using vary_element.

alter_elements is used to make a one-time change to a specific parameter of one or more elements. This is provided as an alternative to editing the lattice file. Using the commandline macro feature, it allows one to change a lattice parameter from the elegant commandline without editing any files. Again, there are examples in on-line file.

In case you don't have it, you can download the examples file at
http://www.aps.anl.gov/Accelerator_Syst ... les.tar.gz

--Michael

Post Reply