In order to avoid infinite calculation loops under resonant conditions, the r_max kwarg limits the maximum number of traced beams per ray segment for the solve_system! interface.
However, this condition is applied to each new split beam in the beam tree, leading to no abort condition if e.g. a Fabry Perot interferometer is traced. This bug effects all subtypes of AbstractBeam.
Solution
Fix the solve_system! interface to track the depth of the split beams. Add e.g. a max_depth kwarg.
In order to avoid infinite calculation loops under resonant conditions, the
r_maxkwarg limits the maximum number of traced beams per ray segment for thesolve_system!interface.However, this condition is applied to each new split beam in the beam tree, leading to no abort condition if e.g. a Fabry Perot interferometer is traced. This bug effects all subtypes of
AbstractBeam.Solution
Fix the
solve_system!interface to track the depth of the split beams. Add e.g. amax_depthkwarg.