Page 1 of 1

Muitipole error input

Posted: 19 Jan 2010, 12:29
by wguo
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

Re: Muitipole error input

Posted: 19 Jan 2010, 13:00
by michael_borland
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

Re: Muitipole error input

Posted: 19 Jan 2010, 13:09
by wguo
Michael,

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

Weiming