facebookresearch / fmmax

Fourier modal method with Jax
MIT License
97 stars 10 forks source link

Special linalg.solve fn #98

Closed mfschubert closed 7 months ago

mfschubert commented 8 months ago

https://github.com/google/jax/issues/20047

This Jax issue seems to manifest in problematic scattering matrices in some situations.

smartalecH commented 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?

mfschubert commented 7 months ago

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.