Page 1 of 1

A question about divide_elements

Posted: 10 Jan 2021, 21:25
by duanz
Hi Michael,

I'd like to split a CSBEND into several slices using divide_elements. If I use save_lattice then only one instance of the slice with the same name of the original CSBEND element appears in the new lattice file, its length and angle are divided by divisions but E1 & E2 remain the same, relative to the original CSBEND element.

I'm aware there is a warning "Using save_lattice and element divisions together will produce an incorrect lattice file." But I wonder how the E1 & E2 of each slice are treated in the internal algorithm of elegant. Thanks!

Best,

Zhe

Re: A question about divide_elements

Posted: 11 Jan 2021, 11:20
by michael_borland
Zhe,

elegant automatically turns off edge effects between consecutive dipoles with the same name. Hence, when a dipole is split, the interior edge effects are suppressed.

You can confirm this by noting that splitting a dipole will make no difference in the tunes, for example.

--Michael

Re: A question about divide_elements

Posted: 11 Jan 2021, 21:49
by duanz
OK, thanks, Michael.

Zhe