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

How to obtain the eigenvalues within a given interval using SLEPc in Fenics?

+1 vote

Suppose I've setup an eigenproblem in Fenics whose eigenvalues are purely real. Is there a way I can setup my SLEPc Eigensolver to retrieve only the eigenvalues whose magnitude lies between a given interval; say, lambda in [a,b], where a< b ?

I'm really not interested in the rest of the spectrum, and would prefer not to waste computational time solving for ALL the eigenvalues if I can obtain those in the narrow band [a,b] in less time. Is there currently a way (e.g. a SLEPc eigensolver solver parameter) to do this within the scope of Fenics?

asked Jul 29, 2015 by pmdelgado2 FEniCS Novice (210 points)

Hi, this cannot be done via the interface of the SLEPcEigenSolver. However in recent version of DOLFIN you can get the SLEPc pointer via eps method provided that you have a build configured with slepc4py. Then EPSSetInterval could be a way to solve your problem.

use eigensolver parameters, for example:
eigensolver.parameters["spectral_transform"] = "shift-and-invert"
eigensolver.parameters["spectral_shift"] = value

...