Muitipole error input

Moderators: cyao, michael_borland

Post Reply
wguo
Posts: 41
Joined: 13 Jun 2008, 12:54

Muitipole error input

Post by wguo » 19 Jan 2010, 12:29

Hi Michael,

I found the tracking is very slow if I assign files to the fields of Systematic_multipoles and random_multipoles in KQUAD and KSEXT. I guess the element module retrieves the files each time? The multipole specs are usually the same for a family, therefore in most cases it is not needed to specify them for individual magnets. Would it help speed up to input the file names in the ele file? Such as:

& multipole
name=SH2*, type=KSEXT, filename=mult.sdds
&end

Best regards,

Weiming

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

Re: Muitipole error input

Post by michael_borland » 19 Jan 2010, 13:00

Weiming,

The multipole data is read only once for each element. Of course, if you have N elements, it will be read N times since in principle it might be different for each.

I think it is slow for two reasons: First, high-order multipoles require computing lots of terms; it is much more computational effort than the basic quad or sextupole. Second, elegant applies the multipoles at each slice of the primary element, rather than once at the end or middle.

Your suggested &multipole command is a good idea. I'll add it to my list. Meanwhile, to speed up the input preparation, just use alter_elements as in
&alter_elements name=*, type=KQUAD, item=SYSTEMATIC_MULTIPOLES, string_value=<filename> &end

--Michael

wguo
Posts: 41
Joined: 13 Jun 2008, 12:54

Re: Muitipole error input

Post by wguo » 19 Jan 2010, 13:09

Michael,

Thanks a lot! I guess I'll just use the alter_elements command for that purpose.

Weiming

Post Reply