> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MUMPS Class Reference

Part of [tmath](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__tmath)

solver for sparse matrices using [MUMPS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_u_m_p_s.md).

## Public Types

| Type | Name |
| - | - |
|  typedef number | [TScalar](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#ad33f729eda6e45412aac71cee702012f) data type of matrix elements |
|  typedef Eigen::SparseMatrix\< [TScalar](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#ad33f729eda6e45412aac71cee702012f) > | [TSparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#a0ce6eae547dc1456730d2df72d9c29cb) the sparse matrix base type |

## Public Member Functions

| Type | Name |
| - | - |
| virtual bool | [Compute](#a79c58864d591ecafc1ef6fc3c5f2e8fc) ([SparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_matrix.md)) computes the factorization, returns true if succeeded |
| virtual bool | [Compute](#a5526f969e26fc63c313b4aa589c764d8) ([SymSparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sym_sparse_matrix.md)) computes the factorization, returns true if succeeded |
| | [MUMPS](#a06236a425fff803e79e7f6d791825364) (bool use\_matrix\_buffer\_as\_MUMPS\_input\_data=false) destructor |
| | [MUMPS](#aca0cd807c82df729b9448fb73b5e08b9) ([SparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_matrix.md) ar) constructor which already factorizes the matrix |
| | [MUMPS](#a87bae4b2fd0071ea275bdd7ccf0943e0) ([SymSparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sym_sparse_matrix.md) ar) constructor which already factorizes the matrix |
| virtual [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [operator\*](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#ab575d53b6b3741bf8b54ca4dad896322) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) other) returns the matrix product inv(A)\*B |
| | [SetPositive](#aef33fc57fc01313826cabdebfc1ca8bd) (bool pos) Tell [MUMPS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_u_m_p_s.md) if the matrix is positive definite (default: false) |
| | [Solve](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#a03c9937003c1c78404c778f1ce257cfd) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) INPUT, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) \*\*OUTPUT, bool \*\*OUTPUT) Solves the given vector on return; returns true if succeeded. |
| | [Solve](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#aed85b6e6bc9e10b49a5eacee4930dc12) ([SparseMatrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_matrix.md) INPUT, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) \*\*OUTPUT, bool \*\*OUTPUT) Solves the given sparse RHS on return; returns true if succeeded. |
| virtual bool | [SolveInPlace](#a6facb69b91b239c79f8272159402c4f4) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) b) Factorizes this matrix and solves the given vector in place;. |
| | [SolveTransposed](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#aeb600a838ac25ea5705191ddcd35d5aa) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) INPUT, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) \*\*OUTPUT, bool \*\*OUTPUT) Solves the system (transpose(Matrix)\*x=b for x; returns true if succeeded. |
| virtual string | [typeIdent](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#a4bab1e661cce06aa1bab0b15bc3f5f9e) () |

## Detailed Description

solver for sparse matrices using [MUMPS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_u_m_p_s.md).

## Constructor & Destructor Documentation

### MUMPS() \[1/3]

```cpp theme={null}
MUMPS(bool use_matrix_buffer_as_MUMPS_input_data = false)
```

destructor

default constructor (inits m\_use\_matrix\_buffer\_as\_MUMPS\_input\_data)

**Parameters**

| Name | Description |
| - | - |
| use\_matrix\_buffer\_as\_MUMPS\_input\_data | if true then the algorithm will not create internal temporary arrays used for factorization, but will act on the existing data arrays. |

### MUMPS() \[2/3]

```cpp theme={null}
MUMPS(SparseMatrix ar)
```

constructor which already factorizes the matrix

**Parameters**

| Name | Description |
| - | - |
| ar | the matrix to be factorized |

### MUMPS() \[3/3]

```cpp theme={null}
MUMPS(SymSparseMatrix ar)
```

constructor which already factorizes the matrix

**Parameters**

| Name | Description |
| - | - |
| ar | the matrix to be factorized |

## Member Function Documentation

### Compute() \[1/2]

```cpp theme={null}
virtual bool Compute(SparseMatrix A)
```

`virtual`

computes the factorization, returns true if succeeded

**Parameters**

| Name | Description |
| - | - |
| A | the matrix to be factorized |

**Returns**

true of successful

Reimplemented from [SparseSolver](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#a198e988cd87fa6915dd1aa906d1fb87c).

### Compute() \[2/2]

```cpp theme={null}
virtual bool Compute(SymSparseMatrix A)
```

`virtual`

computes the factorization, returns true if succeeded

**Parameters**

| Name | Description |
| - | - |
| A | the matrix to be factorized |

**Returns**

true of successful

Reimplemented from [SparseSolver](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#ac6480ddf60c975e344ad332af27eba9b).

### operator\*()

```cpp theme={null}
virtual Matrix operator*(Matrix other)
```

`virtual` `inherited`

returns the matrix product inv(A)\*B

**Parameters**

| Name | Description |
| - | - |
| other | the second argument of inv(A)\*B |

**Returns**

the product of the factorized matrix multiplied with *other*

### SetPositive()

```cpp theme={null}
SetPositive(bool pos)
```

Tell [MUMPS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_u_m_p_s.md) if the matrix is positive definite (default: false)

**Parameters**

| Name | Description |
| - | - |
| pos | true if positive definite |

### Solve() \[1/2]

```cpp theme={null}
Solve(
    Matrix INPUT,
    Matrix ** OUTPUT,
    bool ** OUTPUT
)
```

`inherited`

Solves the given vector on return; returns true if succeeded.

**Parameters**

| Name | Description |
| - | - |
| b | the right hand side |
| x | the solution |
| success | the return value of *Solve(b,x)* allow the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script bindings |

### Solve() \[2/2]

```cpp theme={null}
Solve(
    SparseMatrix INPUT,
    Matrix ** OUTPUT,
    bool ** OUTPUT
)
```

`inherited`

Solves the given sparse RHS on return; returns true if succeeded.

**Parameters**

| Name | Description |
| - | - |
| b | the right hand side |
| x | the solution |

**Returns**

true if successfulallows the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script

### SolveInPlace()

```cpp theme={null}
virtual bool SolveInPlace(Matrix b)
```

`virtual`

Factorizes this matrix and solves the given vector in place;.

**Returns**

returns true if succeeded

**Parameters**

| Name | Description |
| - | - |
| b | on input: the right hand side. On output: the solution x |

Reimplemented from [SparseSolver](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_sparse_solver.md#a6facb69b91b239c79f8272159402c4f4).

### SolveTransposed()

```cpp theme={null}
SolveTransposed(
    Matrix INPUT,
    Matrix ** OUTPUT,
    bool ** OUTPUT
)
```

`inherited`

Solves the system (transpose(Matrix)\*x=b for x; returns true if succeeded.

**Parameters**

| Name | Description |
| - | - |
| b | the right hand side |
| x | the solution |

**Returns**

true if successful allows the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script.

### typeIdent()

```cpp theme={null}
virtual string typeIdent()
```

`virtual` `inherited`

**Returns**

the name of the datatype
