How to use the slepc4py.SLEPc.EPS.Type.ARNOLDI function in slepc4py

To help you get started, we’ve selected a few slepc4py examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathLab / RBniCS / rbnics / backends / basic / wrapping / slepc_eps_solver.py View on Github external
self.eps.setProblemType(SLEPc.EPS.ProblemType.NHEP)
                    elif value == "gen_hermitian":
                        self.eps.setProblemType(SLEPc.EPS.ProblemType.GHEP)
                    elif value == "gen_non_hermitian":
                        self.eps.setProblemType(SLEPc.EPS.ProblemType.GNHEP)
                    elif value == "pos_gen_non_hermitian":
                        self.eps.setProblemType(SLEPc.EPS.ProblemType.PGNHEP)
                    else:
                        raise RuntimeError("Invalid problem type")
                elif key == "solver":
                    if value == "power":
                        self.eps.setType(SLEPc.EPS.Type.POWER)
                    elif value == "subspace":
                        self.eps.setType(SLEPc.EPS.Type.SUBSPACE)
                    elif value == "arnoldi":
                        self.eps.setType(SLEPc.EPS.Type.ARNOLDI)
                    elif value == "lanczos":
                        self.eps.setType(SLEPc.EPS.Type.LANCZOS)
                    elif value == "krylov-schur":
                        self.eps.setType(SLEPc.EPS.Type.KRYLOVSCHUR)
                    elif value == "lapack":
                        self.eps.setType(SLEPc.EPS.Type.LAPACK)
                    elif value == "arpack":
                        self.eps.setType(SLEPc.EPS.Type.ARPACK)
                    elif value == "jacobi-davidson":
                        self.eps.setType(SLEPc.EPS.Type.JD)
                    elif value == "generalized-davidson":
                        self.eps.setType(SLEPc.EPS.Type.GD)
                    else:
                        raise RuntimeError("Invalid solver type")
                elif key == "spectral_shift":
                    st = self.eps.getST()