[petsc-users] Matrix-free generalised eigenvalue problem

Jose E. Roman jroman at dsic.upv.es
Wed Jul 12 12:24:14 CDT 2023


By default, it is solving the problem as B^{-1}*A*x=lambda*x (see chapter on Spectral Transformation). That is why A can be a shell matrix without problem. But B needs to be an explicit matrix in order to compute an LU factorization. If B is also a shell matrix then you should set an iterative solver for the associated KSP (see examples in the chapter).

An alternative is to create a shell matrix M that computes the action of B^{-1}*A, then pass M to the EPS solver as a standard eigenproblem.

Jose


> El 12 jul 2023, a las 19:04, Quentin Chevalier <quentin.chevalier at polytechnique.edu> escribió:
> 
> Hello PETSc Users,
> 
> I have a generalised eigenvalue problem : Ax= lambda Bx
> I used to have only A as a matrix-free method, I used mumps and an LU preconditioner, everything worked fine.
> 
> Now B is matrix-free as well, and my solver is returning an error : "MatSolverType mumps does not support matrix type python", which is ironic given it seem to handle A quite fine.
> 
> I have read in the user manual here that there some methods may require additional methods to be supplied for B like MATOP_GET_DIAGONAL but it's unclear to me exactly what I should be implementing and what is the best solver for my case.
> 
> A is hermitian, B is hermitian positive but not positive-definite or real. Therefore I have specified a GHEP problem type to the EPS object.
> 
> I use PETSc in complex mode through the petsc4py bridge.
> 
> Any help on how to get EPS to work for a generalised matrix-free case would be welcome. Performance is not a key issue here - I have a tractable high value case on hand.
> 
> Thank you for your time,
> 
> Quentin



More information about the petsc-users mailing list