MUMPS

class pyomo.contrib.pynumero.linalg.mumps_interface.MumpsCentralizedAssembledLinearSolver(sym=0, par=1, comm=None, cntl_options=None, icntl_options=None)[source]

Bases: DirectLinearSolverInterface

A thin wrapper around pymumps which uses the centralized assembled matrix format. In other words ICNTL(5) = 0 and ICNTL(18) = 0.

Solve matrix * x = rhs for x.

See the Mumps documentation for descriptions of the parameters. The section numbers listed below refer to the Mumps documentation for version 5.2.1.

Parameters:
  • sym (int, optional) – See section 5.2.1 of the Mumps documentation

  • par (int, optional) – See section 5.1.3

  • comm (mpi4py comm, optional) – See section 5.1.3

  • cntl_options (dict, optional) – See section 6.2

  • icntl_options (dict, optional) – See section 6.1

do_back_solve(rhs: ndarray | BlockVector, raise_on_error: bool = True) Tuple[ndarray | BlockVector | None, LinearSolverResults][source]

Perform back solve with Mumps. Note that both do_symbolic_factorization and do_numeric_factorization should be called before do_back_solve.

Parameters:

rhs (numpy.ndarray or pyomo.contrib.pynumero.sparse.BlockVector) – The right hand side in matrix * x = rhs.

Returns:

result – The x in matrix * x = rhs. If rhs is a BlockVector, then, result will be a BlockVector with the same block structure as rhs.

Return type:

numpy.ndarray or pyomo.contrib.pynumero.sparse.BlockVector

do_numeric_factorization(matrix: spmatrix | BlockMatrix, raise_on_error: bool = True) LinearSolverResults[source]

Perform Mumps factorization. Note that do_symbolic_factorization should be called before do_numeric_factorization.

Parameters:

matrix (scipy.sparse.spmatrix or pyomo.contrib.pynumero.sparse.BlockMatrix) – This matrix must have the same nonzero structure as the matrix passed into do_symbolic_factorization. The matrix will be converted to coo format if it is not already in coo format. If sym is 1 or 2, the matrix will be converted to lower triangular.

do_symbolic_factorization(matrix: spmatrix | BlockMatrix, raise_on_error: bool = True) LinearSolverResults[source]

Perform Mumps analysis.

Parameters:

matrix (scipy.sparse.spmatrix or pyomo.contrib.pynumero.sparse.BlockMatrix) – This matrix must have the same nonzero structure as the matrix passed into do_numeric_factorization. The matrix will be converted to coo format if it is not already in coo format. If sym is 1 or 2, the matrix will be converted to lower triangular.

get_cntl(key)[source]
get_icntl(key)[source]
get_info(key)[source]
get_infog(key)[source]
get_rinfo(key)[source]
get_rinfog(key)[source]
increase_memory_allocation(factor)[source]
set_cntl(key, value)[source]
set_icntl(key, value)[source]
solve(matrix: spmatrix | BlockMatrix, rhs: ndarray | BlockVector, raise_on_error: bool = True) Tuple[ndarray | BlockVector | None, LinearSolverResults]