calling a script many times within the elements of a lattice

Moderators: cyao, michael_borland

Post Reply
Philippe Piot
Posts: 83
Joined: 20 Aug 2008, 13:18
Location: Northern Illinois University & Argonne National Laboratory
Contact:

calling a script many times within the elements of a lattice

Post by Philippe Piot » 10 Jul 2014, 10:18

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.

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

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

Post by michael_borland » 10 Jul 2014, 12:17

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

Post Reply