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.GHIEP, solver: slepc4py.SLEPc.EPS.Type = slepc4py.SLEPc.EPS.Type.KRYLOVSCHUR, nev: int = 10, tol: float = 1e-07, max_it: int = 1000, target: float = 1.0, shift: float = 0.0) slepc4py.SLEPc.EPS#

Solve generalized eigenvalue problem A*x=lambda*B*x using shift-and-invert as spectral transform method.

Parameters:
  • A (PETSc.Mat) – The matrix A

  • B (PETSc.Mat) – The matrix B

  • problem_type (SLEPc.EPS.ProblemType) – The problem type, for options see: https://bit.ly/3gM5pth

  • solver (SLEPc.EPS.Type) – Solver type, for options see: https://bit.ly/35LDcMG

  • nev (int) – Number of requested eigenvalues.

  • tol (float) – Tolerance for slepc solver

  • max_it (int) – Maximum number of iterations.

  • target (float) – Target eigenvalue. Also used for sorting.

  • shift (float) – Shift ‘sigma’ used in shift-and-invert.

Returns:

SLEPc.EPS – The SLEPc solver