Bug in LSRMDLTR

Moderators: michael_borland, soliday

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

Bug in LSRMDLTR

Post by michael_borland » 21 Aug 2009, 08:20

There is a bug in the LSRMDLTR element when the field expansion is set to "leading-terms" or "exact". The longitudinal magnetic field has the wrong sign, leading to incorrect vertical focusing. For those who build from source, a corrected file is attached. This fix will appear in the next release.

Thanks to Dao Xiang (SLAC) for alerting me to the problem.

--Michael
Attachments
motion.c
(82.59 KiB) Downloaded 1250 times

zzhang
Posts: 9
Joined: 03 Nov 2014, 19:29

Re: Bug in LSRMDLTR

Post by zzhang » 04 Nov 2014, 12:38

Hi Michael,

I find this bug show up again in version 26.0.2, with incorrect vertical focusing when the field expansion is set to "leading-terms" or "exact".

Zhen

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

Re: Bug in LSRMDLTR

Post by michael_borland » 05 Nov 2014, 00:01

Zhen,

I tested LSRMDLTR against WIGGLER and CWIGGLER, and the focusing seems correct for both "leading terms" and "exact" expansions. Can you check again, and send an example input file that shows the problem?

Thanks--Michael

zzhang
Posts: 9
Joined: 03 Nov 2014, 19:29

Re: Bug in LSRMDLTR

Post by zzhang » 12 Nov 2014, 14:43

Michael,

Attached please find the input files of LSRMDLTR. For different FIELD_EXPANSION I found the final phase space t-yp and y-yp were different. There were vertical focusing when it was "leading terms" or "exact". The code version is 26.0.2 on the oak cluster of SLAC.

Thanks.

Zhen
Attachments
modulator.lte
(524 Bytes) Downloaded 274 times
modulator.ele
(2.11 KiB) Downloaded 272 times

zzhang
Posts: 9
Joined: 03 Nov 2014, 19:29

Re: Bug in LSRMDLTR

Post by zzhang » 12 Nov 2014, 14:45

The phase space of y-yp for different FIELD_EXPANSION are attached.
Attachments
ideal_yyp.png
leadingterms_yyp.png
exact_yyp.png

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

Re: Bug in LSRMDLTR

Post by michael_borland » 16 Nov 2014, 17:45

Zhen,

If I turn the laser off, I can compare the results to other methods in elegant. Doing this shows nearly exact agreement between the LSRMDLTR (exact and leading-terms modes) and CWIGGLER elements, which are implemented in completely different ways (by different people). So I think the LSRMDLTR is getting the focusing correct. It "ideal" method of course is not correct.

Am I missing something?

--Michael

Post Reply