Page 1 of 1

calling a script many times within the elements of a lattice

Posted: 10 Jul 2014, 10:18
by Philippe Piot
All,
Is there a way to "continuously" call a script a few times per elements? We would like to use an external space charge algorithm coupled with elegant via the script element. Thank you very much for any suggestion. Best, -- Philippe.

Re: calling a script many times within the elements of a lat

Posted: 10 Jul 2014, 12:17
by michael_borland
Philippe,

The only way to do this is to split the elements and insert many script elements. Using the divide_elements and insert_elements commands should make this less painful.

However, I think this will be very slow. It might be best to just add a this as a feature inside elegant. If you can send me the algorithm coded already coded in C, it shouldn't be that hard to add.

--Michael