Closed mfschubert closed 7 months ago
Hmm would switching to a more "friendly" scattering matrix formulation avoid the issue? The condition number for the example given was indeed pretty bad... but I wonder if we'd have similar issues if we used, for example, the convention described in Rumpf et al?
That could be, but I am not so optimistic.
I do think that changing the PML could improve things, as called for in #99. That might be a better fix than the approach in this PR, since this PR is in some sense performance-suboptimal and will result in a larger program. For this reason I have no plan to actually merge this change.
In the context of PML improvement, one could specifically look for the condition number of these matrices.
https://github.com/google/jax/issues/20047
This Jax issue seems to manifest in problematic scattering matrices in some situations.