Implementation extended to allow for asymmetric trap shapes. The field lines can now be calculated in positive and negative direction starting from z=0, zmax can be evaluated on the positive z branch and negative z branch, ArbritraryTrap has additional keyword argument symmetric_trap that defaults to true to have backward compatibility. Simulation of trajectory is calculated individually for positive and negative z branch both starting at z=0. Solutions are combined and forwarded.
Tests show that for symmetric fields the same solutions are returned in both symmetric_trap modes.
Testing asymmetric traps show expected behaviour.
Time in asymmetric mode takes double the time it takes for the symmetric mode.
Implementation extended to allow for asymmetric trap shapes. The field lines can now be calculated in positive and negative direction starting from z=0, zmax can be evaluated on the positive z branch and negative z branch, ArbritraryTrap has additional keyword argument symmetric_trap that defaults to true to have backward compatibility. Simulation of trajectory is calculated individually for positive and negative z branch both starting at z=0. Solutions are combined and forwarded. Tests show that for symmetric fields the same solutions are returned in both symmetric_trap modes. Testing asymmetric traps show expected behaviour. Time in asymmetric mode takes double the time it takes for the symmetric mode.