mumps#
Includes the MUMPS wave function solver.
Classes:
-
MUMPS–Wave function solver using MUMPS for sparse matrix solving.
MUMPS
#
MUMPS(matrix_type: str = 'complex_nonsymmetric', matrix_view: str = 'full', ordering: str = 'metis', verbose: bool = False)
Bases: WFSolver
Wave function solver using MUMPS for sparse matrix solving.
This solver uses MUMPS to solve sparse linear systems on the CPU. It can reuse the analysis phase if configured to do so, which can speed up repeated solves with the same matrix structure.
Parameters:
-
matrix_type(str, default:'complex_nonsymmetric') –The type of matrix to be solved. The only valid option is 'complex_nonsymmetric', which is the default. This is a placeholder for future support of other matrix types.
-
matrix_view(str, default:'full') –The view of the matrix. The only valid option is 'full', which means the full matrix is used. Default is 'full'. This is a placeholder for future support of other matrix views.
-
ordering(str, default:'metis') –The ordering method to use for the matrix factorization. Valid options are 'amd', 'amf', 'scotch', 'pord', 'metis', 'qamd', and 'auto'. The 'metis' and 'scotch' orderings are apparently usually pretty good. The 'auto' option will let MUMPS choose the "best" ordering. Default is 'metis'.
-
verbose(bool, default:False) –If True, enable verbose output from MUMPS. Default is False.
Methods:
-
solve–Solves the sparse linear system a @ x = b using MUMPS.
solve
#
solve(a: spmatrix, b: NDArray, reuse_analysis: bool = False, reuse_factorization: bool = False) -> NDArray
Solves the sparse linear system a @ x = b using MUMPS.
Parameters:
-
a(spmatrix) –The sparse system matrix.
-
b(NDArray) –The dense right-hand side vector.
-
reuse_analysis(bool, default:False) –Whether to reuse the analysis phase from a previous solve, by by default False. This is useful when solving multiple linear systems with the same sparsity pattern but different numerical values.
-
reuse_factorization(bool, default:False) –Whether to reuse the numerical factorization from a previous solve, by default False. This can only be True if reuse_analysis is also True. Note that this must only be True if the matrix values have not changed since the last factorization.
Returns:
-
x(NDArray) –The solution vector.