[petsc-users] Computing Krylov decompositions with PETSc/SLEPc
Gard Spreemann
gard.spreemann at epfl.ch
Mon Jul 9 05:23:26 CDT 2018
On Friday 6 July 2018 18:46:56 CEST Jose E. Roman wrote:
>
> > 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
Thanks. That could be a way out then.
> >> 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.
Hmm, do these functions actually compute (the matrices involved in)
the full polynomial, or do they do some clever approximation? I
believe my matrices will often see a lot of sparsity reduction when
one takes a large power of them.
Best,
Gard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180709/0f047ebe/attachment.sig>
More information about the petsc-users
mailing list