solve_GEP_shiftinvert#
module opensg.utils.solid
- opensg.utils.solid.solve_GEP_shiftinvert(A: petsc4py.PETSc.Mat, B: petsc4py.PETSc.Mat, problem_type: slepc4py.SLEPc.EPS.ProblemType = slepc4py.SLEPc.EPS.ProblemType.GHEP, solver: slepc4py.SLEPc.EPS.Type = slepc4py.SLEPc.EPS.Type.KRYLOVSCHUR, nev: int = 2, tol: float = 1e-06, max_it: int = 1000, target: float = 5, shift: float = 1) slepc4py.SLEPc.EPS #
Solve generalized eigenvalue problem A*x=lambda*B*x using shift-and-invert as spectral transform method. Parameters ———- A
The matrix A
- B
The matrix B
- problem_type
The problem type, for options see: https://bit.ly/3gM5pth
- solver:
Solver type, for options see: https://bit.ly/35LDcMG
- nev
Number of requested eigenvalues.
- tol
Tolerance for slepc solver
- max_it
Maximum number of iterations.
- target
Target eigenvalue. Also used for sorting.
- shift
Shift ‘sigma’ used in shift-and-invert.
- interval
A tuple (min_val, max_val) to restrict the search to a specific interval on the real axis. To search for only positive eigenvalues, you could use interval=(1e-9, PETSc.DECIMAL_MAX). This feature is supported by solvers like KRYLOVSCHUR.
- Returns:
EPS
The SLEPc solver