solve_GEP_shiftinvert
module opensg.utils.eigenvalue_solver
- opensg.utils.eigenvalue_solver.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.
- Returns:
SLEPc.EPS – The configured and solved SLEPc EPS object.