(self)
| 3 | |
| 4 | class SuperLU(ngsolve.la.SparseFactorizationInterface): |
| 5 | def Factor(self): |
| 6 | import scipy.sparse as sp |
| 7 | import scipy.sparse.linalg as spla |
| 8 | vals, rows, cols = self.GetInnerMatrix().CSR() |
| 9 | self.inv_mat = spla.factorized(sp.csr_matrix((vals, rows, cols))) |
| 10 | |
| 11 | def Solve(self, rhs, sol): |
| 12 | sol.FV().NumPy()[:] = self.inv_mat(rhs.FV().NumPy()) |
no test coverage detected