Hi,
I got a large DA, with a set of sextupole, but found that during the tracking of "find_aperture" all particles are lost.
Then the (x,y)=(+/1, +/1) are the default one ? the Area=2 m^2. are they supposed to be zero ?
Thanks
Here are the ouput:
lyyang@debian:~/devel/nsls2/trunk/optim$ sddsprintout col lat_0000_offm.aper
Printout for SDDS file lat_0000_offm.aper
x y xClipped yClipped
m m m m

1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
lyyang@debian:~/devel/nsls2/trunk/optim$ sddsprintout par lat_0000_offm.aper
Printout for SDDS file lat_0000_offm.aper
Step = 1 Area (m$a2$n) = 2.000000e+00
tracking step 1
** Starting 11line aperture search
* Searching line 0
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.000000e03, 0.000000e+00
particle lost for x=9.990000e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.000000e04, 0.000000e+00
particle lost for x=9.995000e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.500000e04, 0.000000e+00
particle lost for x=9.997500e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.250000e04, 0.000000e+00
particle lost for x=9.998750e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 6.250000e05, 0.000000e+00
particle lost for x=9.999375e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.125000e05, 0.000000e+00
particle lost for x=9.999687e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.562500e05, 0.000000e+00
particle lost for x=9.999844e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.812500e06, 0.000000e+00
particle lost for x=9.999922e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.906250e06, 0.000000e+00
particle lost for x=9.999961e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 1
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.510565e04, 4.635255e05
particle lost for x=9.990489e01, y=9.999536e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.755283e04, 2.317627e05
particle lost for x=9.995245e01, y=9.999768e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.377641e04, 1.158814e05
particle lost for x=9.997622e01, y=9.999884e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.188821e04, 5.794069e06
particle lost for x=9.998811e01, y=9.999942e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.944103e05, 2.897034e06
particle lost for x=9.999406e01, y=9.999971e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.972052e05, 1.448517e06
particle lost for x=9.999703e01, y=9.999986e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.486026e05, 7.242586e07
particle lost for x=9.999851e01, y=9.999993e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.430129e06, 3.621293e07
particle lost for x=9.999926e01, y=9.999996e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.715065e06, 1.810646e07
particle lost for x=9.999963e01, y=9.999998e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 2
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 8.090170e04, 8.816779e05
particle lost for x=9.991910e01, y=9.999118e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.045085e04, 4.408389e05
particle lost for x=9.995955e01, y=9.999559e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.022542e04, 2.204195e05
particle lost for x=9.997977e01, y=9.999780e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.011271e04, 1.102097e05
particle lost for x=9.998989e01, y=9.999890e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.056356e05, 5.510487e06
particle lost for x=9.999494e01, y=9.999945e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.528178e05, 2.755243e06
particle lost for x=9.999747e01, y=9.999972e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.264089e05, 1.377622e06
particle lost for x=9.999874e01, y=9.999986e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 6.320445e06, 6.888108e07
particle lost for x=9.999937e01, y=9.999993e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.160223e06, 3.444054e07
particle lost for x=9.999968e01, y=9.999997e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 3
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.877853e04, 1.213525e04
particle lost for x=9.994122e01, y=9.998786e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.938926e04, 6.067627e05
particle lost for x=9.997061e01, y=9.999393e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.469463e04, 3.033814e05
particle lost for x=9.998531e01, y=9.999697e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.347316e05, 1.516907e05
particle lost for x=9.999265e01, y=9.999848e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.673658e05, 7.584534e06
particle lost for x=9.999633e01, y=9.999924e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.836829e05, 3.792267e06
particle lost for x=9.999816e01, y=9.999962e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.184145e06, 1.896134e06
particle lost for x=9.999908e01, y=9.999981e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.592072e06, 9.480668e07
particle lost for x=9.999954e01, y=9.999991e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.296036e06, 4.740334e07
particle lost for x=9.999977e01, y=9.999995e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 4
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.090170e04, 1.426585e04
particle lost for x=9.996910e01, y=9.998573e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.545085e04, 7.132924e05
particle lost for x=9.998455e01, y=9.999287e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.725425e05, 3.566462e05
particle lost for x=9.999227e01, y=9.999643e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.862712e05, 1.783231e05
particle lost for x=9.999614e01, y=9.999822e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.931356e05, 8.916155e06
particle lost for x=9.999807e01, y=9.999911e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.656781e06, 4.458077e06
particle lost for x=9.999903e01, y=9.999955e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.828391e06, 2.229039e06
particle lost for x=9.999952e01, y=9.999978e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.414195e06, 1.114519e06
particle lost for x=9.999976e01, y=9.999989e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.207098e06, 5.572597e07
particle lost for x=9.999988e01, y=9.999994e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 5
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 1.500000e04
particle lost for x=1.000000e+00, y=9.998500e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 7.500000e05
particle lost for x=1.000000e+00, y=9.999250e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 3.750000e05
particle lost for x=1.000000e+00, y=9.999625e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 1.875000e05
particle lost for x=1.000000e+00, y=9.999813e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 9.375000e06
particle lost for x=1.000000e+00, y=9.999906e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 4.687500e06
particle lost for x=1.000000e+00, y=9.999953e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 2.343750e06
particle lost for x=1.000000e+00, y=9.999977e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 1.171875e06
particle lost for x=1.000000e+00, y=9.999988e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 0.000000e+00, 5.859375e07
particle lost for x=1.000000e+00, y=9.999994e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 6
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.090170e04, 1.426585e04
particle lost for x=9.996910e01, y=9.998573e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.545085e04, 7.132924e05
particle lost for x=9.998455e01, y=9.999287e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.725425e05, 3.566462e05
particle lost for x=9.999227e01, y=9.999643e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.862712e05, 1.783231e05
particle lost for x=9.999614e01, y=9.999822e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.931356e05, 8.916155e06
particle lost for x=9.999807e01, y=9.999911e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.656781e06, 4.458077e06
particle lost for x=9.999903e01, y=9.999955e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.828391e06, 2.229039e06
particle lost for x=9.999952e01, y=9.999978e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.414195e06, 1.114519e06
particle lost for x=9.999976e01, y=9.999989e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.207098e06, 5.572597e07
particle lost for x=9.999988e01, y=9.999994e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 7
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.877853e04, 1.213525e04
particle lost for x=9.994122e01, y=9.998786e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.938926e04, 6.067627e05
particle lost for x=9.997061e01, y=9.999393e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.469463e04, 3.033814e05
particle lost for x=9.998531e01, y=9.999697e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.347316e05, 1.516907e05
particle lost for x=9.999265e01, y=9.999848e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.673658e05, 7.584534e06
particle lost for x=9.999633e01, y=9.999924e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.836829e05, 3.792267e06
particle lost for x=9.999816e01, y=9.999962e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.184145e06, 1.896134e06
particle lost for x=9.999908e01, y=9.999981e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.592072e06, 9.480668e07
particle lost for x=9.999954e01, y=9.999991e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.296036e06, 4.740334e07
particle lost for x=9.999977e01, y=9.999995e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 8
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 8.090170e04, 8.816779e05
particle lost for x=9.991910e01, y=9.999118e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.045085e04, 4.408389e05
particle lost for x=9.995955e01, y=9.999559e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.022542e04, 2.204195e05
particle lost for x=9.997977e01, y=9.999780e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.011271e04, 1.102097e05
particle lost for x=9.998989e01, y=9.999890e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.056356e05, 5.510487e06
particle lost for x=9.999494e01, y=9.999945e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.528178e05, 2.755243e06
particle lost for x=9.999747e01, y=9.999972e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.264089e05, 1.377622e06
particle lost for x=9.999874e01, y=9.999986e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 6.320445e06, 6.888108e07
particle lost for x=9.999937e01, y=9.999993e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.160223e06, 3.444054e07
particle lost for x=9.999968e01, y=9.999997e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 9
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 9.510565e04, 4.635255e05
particle lost for x=9.990489e01, y=9.999536e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 4.755283e04, 2.317627e05
particle lost for x=9.995245e01, y=9.999768e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.377641e04, 1.158814e05
particle lost for x=9.997622e01, y=9.999884e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.188821e04, 5.794069e06
particle lost for x=9.998811e01, y=9.999942e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.944103e05, 2.897034e06
particle lost for x=9.999406e01, y=9.999971e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.972052e05, 1.448517e06
particle lost for x=9.999703e01, y=9.999986e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.486026e05, 7.242586e07
particle lost for x=9.999851e01, y=9.999993e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.430129e06, 3.621293e07
particle lost for x=9.999926e01, y=9.999996e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.715065e06, 1.810646e07
particle lost for x=9.999963e01, y=9.999998e01
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
* Searching line 10
particle lost for x=0.000000e+00, y=0.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.000000e03, 0.000000e+00
particle lost for x=9.990000e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 5.000000e04, 0.000000e+00
particle lost for x=9.995000e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 2.500000e04, 0.000000e+00
particle lost for x=9.997500e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.250000e04, 0.000000e+00
particle lost for x=9.998750e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 6.250000e05, 0.000000e+00
particle lost for x=9.999375e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.125000e05, 0.000000e+00
particle lost for x=9.999687e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 1.562500e05, 0.000000e+00
particle lost for x=9.999844e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 7.812500e06, 0.000000e+00
particle lost for x=9.999922e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
divided search interval to 3.906250e06, 0.000000e+00
particle lost for x=9.999961e01, y=1.000000e+00
Sweep done, particle survived up to x=1.000000e+00, y=1.000000e+00
Finished all tracking steps.
Finished dynamic aperture search.
End of input data encountered.
statistics: ET: 00:00:01 CP: 1.20 BIO:0 DIO:0 PF:0 MEM:2365
=====================================================================================
Thanks for using elegant. Please cite the following reference in your publications:
M. Borland, "elegant: A Flexible SDDSCompliant Code for Accelerator Simulation,"
Advanced Photon Source LS287, September 2000.
If you use a modified version, please indicate this in all publications.
=====================================================================================
All particle lost, but give DA area very large
Moderators: cyao, michael_borland

 Posts: 1811
 Joined: 19 May 2008, 09:33
 Location: Argonne National Laboratory
 Contact:
Re: All particle lost, but give DA area very large
I think this is a bug. I never prepared the algorithm to deal with all particles being lost.
If you can post the input files (or email them to me), it would make it easier for me to understand what's happening.
Michael
If you can post the input files (or email them to me), it would make it easier for me to understand what's happening.
Michael
Re: All particle lost, but give DA area very large
Hi Michael,
Thanks for looking at this problem.
Here are the lattice file and kickmap.
Lingyun
Thanks for looking at this problem.
Here are the lattice file and kickmap.
Lingyun
 Attachments

 W90v5_pole80mm_finemesh_7m.sdds
 kick map needed
 (78.57 KiB) Downloaded 1132 times

 lat_0000_offm.ele
 ele file
 (763 Bytes) Downloaded 1223 times

 lat_0000.lte
 lattice file
 (8.66 KiB) Downloaded 1185 times

 Posts: 1811
 Joined: 19 May 2008, 09:33
 Location: Argonne National Laboratory
 Contact:
Re: All particle lost, but give DA area very large
Lingyun,
It is indeed a bug. The attached file contains the fix, which you can use if you build from source.
Otherwise, a workaround is to postprocess the file, which can be done by adding this command at the end of the input file
&subprocess command = "
sddsprocess %s.aper redefine=parameter,Area,\"Area 2 == ? 0 : Area $ \"
" &end
Michael
It is indeed a bug. The attached file contains the fix, which you can use if you build from source.
Otherwise, a workaround is to postprocess the file, which can be done by adding this command at the end of the input file
&subprocess command = "
sddsprocess %s.aper redefine=parameter,Area,\"Area 2 == ? 0 : Area $ \"
" &end
Michael
 Attachments

 aperture_search.c
 (36.9 KiB) Downloaded 1144 times
Re: All particle lost, but give DA area very large
Michael,
Thanks for this quick fix, I didn't build from source code, so the post process would be a best solution for me now.
Lingyun
Thanks for this quick fix, I didn't build from source code, so the post process would be a best solution for me now.
Lingyun