Dear Francis,
On 30 Apr 2016, at 21:14, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello Colin,
As a bit of an aside, is there somewhere I can read more about the "complex number issue" that you discussed with Terry Haut?
I ask because I have been trying to develop code in FEniCS to compute the linear stability characteristics in different models, i.e. QG, SW and whatever else I can muster. I have had success using the direct solver. Unfortunately, the way the problem is formulated I want to find the eigenvalue with the largest imaginary part. as I'm sure you already know, the imaginary numbers in PETSc and SLEPc are not part of the default FEniCS package, or so I've been told. This seems to suggest that I need to use a direct solver, which is problematic when I want to solve 2D eigenvalue problems. I wonder whether the complex number issue you mentioned might help me to reformulate it in such a way that the eigenvalue I want is real, which FEniCS can solve?
As long as your operator has real-valued entries, you can happily use SLEPc (via slepc4py) to compute eigenmodes with complex eigenvalues. If you want the largest imaginary part for your eigenvalues you just have to ask SLEPc to target the appropriate part of the spectrum. Although we have not hooked up a high-level interface for this, you can happily use SLEPc with the operators that Firedrake assembles. You can see one test doing this for the laplacian here: https://github.com/firedrakeproject/firedrake/blob/master/tests/regression/t... Modern versions of firedrake-install allow you to pass --slepc to install SLEPc compatibly with the rest of the distribution. This carries over to firedrake-update (so you can type firedrake-update --slepc to update your installation and build SLEPc as well).
I would be very happy to do all of this in firedrake but I have not seen any eigenvalue examples and have heard this is on the wish list, but I am sure you guys have a long wish list. If there is anything I can do to help in testing this I would be happy to.
Please let us know if the above approach works for you. Cheers, Lawrence