MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / Factor

Method Factor

python/directsolvers.py:5–9  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3
4class 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())

Callers 1

BandCholeskyFactorsMethod · 0.45

Calls 1

GetInnerMatrixMethod · 0.45

Tested by

no test coverage detected