[petsc-users] Computing Krylov decompositions with PETSc/SLEPc

Jose E. Roman jroman at dsic.upv.es
Fri Jul 6 11:46:56 CDT 2018



> El 6 jul 2018, a las 16:37, Gard Spreemann <gard.spreemann at epfl.ch> escribió:
> 
> On Friday 6 July 2018 16:18:27 CEST Jose E. Roman wrote:
>> SLEPc's default eigensolver 'krylovschur' does this kind of computation repeatedly, in an outer loop (the restarts) until eigenvalues are converged. If you call EPSSolve() with -eps_max_it 1 to avoid any restarts then you will get something similar to what you want. The computed basis can be retrieved with EPSGetBV(). However, this is not the intended usage, and hence it is not documented. You will have to look at the source code and see what is being computed.
> 
> Thank you. I'll have a look and see if I can make sense of it.
> 
> I had the impression that it's only possible to set the *maximum*
> dimension of the Krylov subspaces used though. Is that the case? I'd
> need to set the dimensionality exactly.

The dimension of the Krylov subspace is controlled by means of the ncv parameter http://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetDimensions.html

> 
>> What do you need this for?
> 
> I need to compute some good approximations of (the action of) certain
> polynomials of a matrix (on a vector). Looking around, it seems there
> are some very nice approximations available if one has an orthonormal
> basis for the Krylov subspaces up to power equal to the degree of the
> polynomial in question.

If you can explicitly compute the coefficients of the polynomial (in the monomial basis) you could also consider using SLEPc's MFN module, that computes f(A)*v where f can be a polynomial.

Jose


> 
> I was therefore hoping there would be some way to leverage SLEPc's
> sophisticated Krylov code.
> 
> 
> Best,
> Gard
> 
> 
> 
> 



More information about the petsc-users mailing list