Dear Francis, On 30/11/16 03:23, Francis Poulin wrote:
Hello,
A while ago someone pointed me towards test_slepc.py for an example on how to solve an eigenvalue problem. I have been using this as a model to compute Quasi-Geostrophic basin modes in a closed basin. We have a version working in FENicS and I am very keen to get it working in Firedrake as well.
I have a good start, which can be found on github,
https://github.com/francispoulin/firedrakeQG/blob/master/basin_modes_qg.py
Unfortunately, I don't know how to do a lot of things. For example specify number of eigenvalues to determine, specify a target eigenvalue, what method to use, or even just look at the eigenvector.
Doing this is strictly in the realm of SLEPc, rather than Firedrake itself. We're "just" providing the operators. The SLEPc documentation is therefore probably helpful: http://slepc.upv.es/documentation/manual.htm It describes everything in terms of the C API, but fortunately, slepc4py has somewhat useful documentation strings (type help(some_slepc_function) in ipython). The translation from C functions to slepc4py functions is quite mechanical: EPSFooBar(eps, ...) translates to: eps.fooBar(...) and so forth. Thanks, Lawrence