Skip to content

superlu#

Includes the SuperLU wave function solver.

Classes:

  • SuperLU

    Wave function solver using LU decomposition for solving.

SuperLU #

SuperLU(matrix_type: str = 'complex_nonsymmetric', matrix_view: str = 'full')

Bases: WFSolver

Wave function solver using LU decomposition for solving.

This solver uses the SuperLU on the CPU for facorization. Depending on the chosen array module, the solution phase is computed on the CPU or GPU.

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.

Methods:

  • solve

    Solves the sparse system a @ x = b using LU decomposition.

solve #

solve(a: spmatrix, b: NDArray, reuse_analysis: bool = False, reuse_factorization: bool = False) -> NDArray

Solves the sparse system a @ x = b using LU decomposition.

Parameters:

  • a (spmatrix) –

    The sparse system matrix.

  • b (NDArray) –

    The right-hand side vector.

  • reuse_analysis (bool, default: False ) –

    Unused for this solver since it does not involve an analysis phase.

  • reuse_factorization (bool, default: False ) –

    Whether to reuse the numerical factorization from a previous solve, by default False. Note that this must only be True if the matrix values have not changed since the last factorization.

Returns:

  • x ( NDArray ) –

    The solution vector.