RCWA has only a single parameter to vary for the purpose of convergence testing: the number of harmonics. Technically, x- and y-resolution might also be relevant, but these can be made arbitrarily good without significantly impacting compute time. It would be relatively easy to add convergence testing, and would be a substantial value-add to avoid the need for it on the user side. This should be integrated directly into the Solve() method and should be the default behavior.
The only thing I am uncertain of is, when doing sweeps, should we do convergence testing for every sweep value, or just for the first one? In principle, it may be necessary to redo, but in practice, if things do not change too much, it is likely unnecessary.
RCWA has only a single parameter to vary for the purpose of convergence testing: the number of harmonics. Technically, x- and y-resolution might also be relevant, but these can be made arbitrarily good without significantly impacting compute time. It would be relatively easy to add convergence testing, and would be a substantial value-add to avoid the need for it on the user side. This should be integrated directly into the Solve() method and should be the default behavior.
The only thing I am uncertain of is, when doing sweeps, should we do convergence testing for every sweep value, or just for the first one? In principle, it may be necessary to redo, but in practice, if things do not change too much, it is likely unnecessary.