DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.
http://dedalus-project.org/
GNU General Public License v3.0
513 stars 121 forks source link

[d3] Modifying invalid modes #171

Closed kburns closed 2 years ago

kburns commented 2 years ago

This PR changes the invalid mode approach to get mixed scalar/vector problems working in spherical coordinates. In spherical coordinates, Hermitian symmetry is only imposed for ell=0 modes for scalar and vector fields. This seems to fix all issues with various boundary conditions and gauges in scalar and vector problems. Issues may still arise with BCs with tensor fields in spheres, as well as in polar coordinates, where Hermitian symmetry will need to be imposed using real projectors as preconditioners, rather than just by dropping modes.