Page 1 of 1

alter_elements, quads, and matrices

Posted: 07 Feb 2013, 22:23
by JoelFrederico
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

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 22:27
by michael_borland
Joel,

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

--Michael

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 22:28
by JoelFrederico

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 22:37
by JoelFrederico
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.

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 23:25
by michael_borland
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

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 23:29
by JoelFrederico
...of course it is.. Sorry for wasting your time!

Re: alter_elements, quads, and matrices

Posted: 07 Feb 2013, 23:30
by michael_borland
No problem.

--Michael