← Back to team overview

dolfin team mailing list archive

Eigenvalue solver and parameters

 

I've modified the eigenvalue solver so make it simple to choose which
part of the spectrum to compute and which algorithm to choose. For example:


  esolver = SLEPcEigenSolver()
  esolver.set("eigenvalue solver", "krylov-schur")
  esolver.set("eigenvalue spectrum", "smallest magnitude")

  esolver.solve(A)

See the demo/la/eigensolver for an example. Computing the smallest set
of eigenvalues in the spectrum seems to work fine, at least with
Krylov-Schur which is the default choice (and probably the best) in
SLEPc.

The SLEPcEigenSolver uses the parameter system for setting options.
So, instead of having member functions setFoo(), setBar() etc, all
parameters are handled by the parameter system. For changes to take
immediate effect (not waiting until calling solve()), it overloads
the function readParameters() in Parametrized which is called each
time a parameter value is changed. I suggest we can use a similar
pattern for other classes.

-- 
Anders

Attachment: signature.asc
Description: Digital signature