What to do with complex eigenvalues
At the moment, the eigen_values() method of the FieldMatrix class returns the real part of the eigenvalues in a FieldVector object. The imaginary part is discarded, but in debug an error is thrown if a nonzero imaginary part is present. The issue is twofold:
-
There is almost always a nonzero imaginary part in the spectra of detailed chemistry Jacobians, and this prevents me from running debug cases where eigenvalues are computed. This behavior needs to be changed so I can do eigenvalue calculations in debug mode.
-
We may wish to store the imaginary part in a second
FieldVector. This is useful for spectral analysis and may eventually be useful for simulation adaptivity, similarly to how we use the real part in the GESAT technique.
Perhaps the eigen_values() method should be split into two functions: real_eigenvalues() that gives only the real parts, and complex_eigenvalues() that gives a FieldVector for the real parts and another FieldVector for the imaginary parts. Perhaps a special struct containing the output may facilitate things. I think this removes the need for any debug errors to be thrown - if I ask for the real eigenvalues with real_eigenvalues(), there's no sense in reporting an error upon truncation of the imaginary parts - that's what I wanted to happen! And if I asked for the complex eigenvalues with complex_eigenvalues() then there's no truncation to report. So no debug error would be necessary.