Skip to content

qttools.wave_function_solver.mumps#

source module qttools.wave_function_solver.mumps

Classes

  • MUMPS Wave function solver using MUMPS for sparse matrix solving.

source class MUMPS(reuse_analysis: bool = True, 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.

Initializes the MUMPS wave function solver.

Parameters

  • reuse_analysis : bool, optional If True, reuse the analysis phase for subsequent solves with the same matrix structure. Default is True.

  • ordering : str, optional The ordering method to use for the matrix factorization. Valid options are 'amd', 'amf', 'scotch', 'pord', 'metis', 'qamd', and 'auto'. Default is '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, optional If True, enable verbose output from MUMPS. Default is False.

Methods

  • solve Solves the sparse linear system a @ x = b using MUMPS.

source method MUMPS.solve(a: sparse.spmatrix, b: NDArray)NDArray

Solves the sparse linear system a @ x = b using MUMPS.

Parameters

  • a : sparse.spmatrix The sparse system matrix.

  • b : NDArray The right-hand side vector.

Returns

  • x : NDArray The solution vector.