t-sakashita / rokko

Integrated Interface for libraries of eigenvalue decomposition
Boost Software License 1.0
10 stars 2 forks source link

SLEPcのJacobi-Davidsonで対角成分を得るルーチンが呼び出されないのはなぜ? #520

Open t-sakashita opened 4 years ago

t-sakashita commented 4 years ago

以下で登録した関数が呼び出されない。

    ierr = MatShellSetOperation(A, MATOP_GET_DIAGONAL, (void(*)())MatGetDiagonal_myMat);

SLEPcでは、Jacobi前処理をどのように実現しているのか?

t-sakashita commented 4 years ago

In the simplest case, defining matrix-vector product operations (MATOP_MULT) is enough for using EPS with shell matrices. However, in the case of generalized problems, if matrix B is also a shell matrix then it may be necessary to define other operations in order to be able to solve the linear system successfully, for example MATOP_GET_DIAGONAL to use an iterative linear solver with Jacobi preconditioning.

https://slepc.upv.es/documentation/current/docs/slepc.pdf

t-sakashita commented 4 years ago

Preconditioners. As explained in the previous chapter, EPS contains preconditioned eigensolvers such as GD or JD. These solvers either apply a preconditioner at a certain step of the computation, or need to solve a correction equation with a preconditioned linear solver. One of the main goals of these solvers is to achieve a similar effect as an inverse-based spectral transformation such as shift-and-invert, but with less computational cost. For this reason, a “preconditioner” spectral transformation has been included in the ST object. However, this is just a convenient way of organizing the functionality, since this fake spectral transform cannot be used with non-preconditioned eigensolvers, and conversely preconditioned eigensolvers cannot be used with conventional spectral transformations.