Hi Chris,
Dedalus returns eigenvalues and eigenvectors in the order they were received from the numerical eigenvalue solver. This can lead to some unexpected behavior, as you've found. I've attached a corrected script which fixes the following issues:
* when you followed the waves on a string script and sorted the eigenvalues, that had no effect on the order of the eigenvectors. Instead of sorting the eigenvalues, I used argsort, which returns a numpy array of indices in order. Then, you can use that array of indices to sort both the eigenvalues and vectors. Now, order here is defined by the default sort algorithm of argsort; if you wanted to sort in some other way, that too is possible, but requires a bit more doing.
* We have a nice routine on the solver, solver.set_state(mode) which sets the data in the state variable to the mode numbered by "mode". I've used that here in the loop over the first 6 modes.
* In order to use set_state(), you have to make the domain complex. This
is a known limitation, since the solutions on the grid for the drum
problem are real valued.
* Just for fun, I used scipy.special's jn_zeros(0,6) to compute the first six zeros of J0 so you don't have to copy them in as text in the script.
With these modifications, the eigenvectors now looks pretty reasonable to me.
As a follow on, we have a package outside of Dedalus called eigentools,
https://bitbucket.org/jsoishi/eigentools, written by Susan Clark and myself, which does things like select only the "good" eigenvalues by solving the EVP at resolution n and 3*n/2 (or any other fraction you choose) and only selecting modes that are the same between the two runs (for some value of "the same"; for details see Boyd Ch 7). It also does nice things like plot spectra and find the fastest growing mode. eigentools is designed to be most helpful when you have an eigenvalue problem with multiple (possibly overlapping) wave families, in which case determining the "order" for good eigenvalues can be tricky. It's still very much a work in progress, but you might find it useful.
Please let us know if you have any more questions!
Jeff