This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

eigensolver: specify a complex target

+1 vote

I am solving an eigenvalue problem and only want to compute the eigenvalues with the largest imaginary part. I know that I can ask for a target imaginary value but I am unsure of the syntax.

Below is maybe what I would like to do but when I set the spectral shift to be an complex value it won't run. If I specify it to be a real number then it converges to a real number.

eigensolver.parameters["spectrum"] = "target imaginary"
eigensolver.parameters["problem_type"] = "gen_hermitian"
eigensolver.parameters["spectral_transform"] = "shift-and-invert"
eigensolver.parameters["spectral_shift"] = 1.0 + 1.0j

Is there a special way to specify the target to be complex?

asked Apr 5, 2016 by fpoulin FEniCS Novice (200 points)

I should have added a few things.

1) When I try using a direct solver (lapack) I do get the correct value.

eigensolver.parameters["solver"] = "lapack"

The solution is the following (something I've verified with a totally different method)

0.23756755992878917 + 0.07949430022578911*1j

2) When I try looking for largest imaginary eigenvalue it fails.

3) When I ask for the target imaginary and setting the target equal to 0.07, then it finds eigenvalues whose real parts are close to 0.07.

Maybe there is a way to specify the target to be complex? From the documentation I would have thought it would assume it was imaginary but maybe that's not the case.

...