alter_elements, quads, and matrices

Moderators: michael_borland, soliday

Post Reply
JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

alter_elements, quads, and matrices

Post by JoelFrederico » 07 Feb 2013, 22:23

Hey all,

This seems like an odd bug. I'm using a pretty simple line with a few quads. Without alter_elements, the K1 value I give my quads returns the correct matrix in the printed matrix file.

When I turn on alter_elements in order to change the K1 value of the quads, it appears to change the K1 value in the matrix to a different incorrect value - neither the value in alter_elements, nor the value in the lattice file.

Does it do this for you?

Joel

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

Re: alter_elements, quads, and matrices

Post by michael_borland » 07 Feb 2013, 22:27

Joel,

I use alter_elements quite a lot and haven't seen this. Can you post an example?

--Michael

JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: alter_elements, quads, and matrices

Post by JoelFrederico » 07 Feb 2013, 22:28


JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: alter_elements, quads, and matrices

Post by JoelFrederico » 07 Feb 2013, 22:37

Specifically, it seems to change K1=0.2959427141 to K1=0.28913603221540796 when I asked for K1=0.977. If you look at the first element, either in the binary file or the ascii file, it comes out with R11=0.964075, which corresponds to the K1=0.289136..., as long as I'm assuming that L=0.5. If I change K1=0.977 in the lattice file then the R11=0.8830378 as expected.

I saw this problem in 24.1beta1 on a linux cluster at SLAC, so I thought beta = bad, DL'ed 25.1.0 binaries for OSX, same problem.

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

Re: alter_elements, quads, and matrices

Post by michael_borland » 07 Feb 2013, 23:25

Joel,

The problem is that you have multiplicative=1 on the alter_elements command. So it multiplies K1 by 0.977 instead of setting it to 0.977.

Set multiplicative=0 and it should work as you want.

--Michael

JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: alter_elements, quads, and matrices

Post by JoelFrederico » 07 Feb 2013, 23:29

...of course it is.. Sorry for wasting your time!

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

Re: alter_elements, quads, and matrices

Post by michael_borland » 07 Feb 2013, 23:30

No problem.

--Michael

Post Reply