Metadata-Version: 2.4
Name: PyMUMPS
Version: 0.4.0
Summary: Python bindings for MUMPS, a parallel sparse direct solver
Author-Email: "Bradley M. Froehle" <brad.froehle@gmail.com>, Stephan Rave <stephan.rave@uni-muenster.de>
Maintainer-Email: Stephan Rave <stephan.rave@uni-muenster.de>
License-Expression: BSD-3-Clause
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Project-URL: homepage, http://github.com/pymumps/pymumps
Project-URL: source, http://github.com/pymumps/pymumps
Project-URL: tracker, http://github.com/pymumps/pymumps/issues
Requires-Python: >=3.8
Requires-Dist: mpi4py
Requires-Dist: numpy
Description-Content-Type: text/markdown

PyMUMPS: A parallel sparse direct solver
========================================


Requirements
------------

* [MUMPS](http://graal.ens-lyon.fr/MUMPS/)
* [mpi4py](https://code.google.com/p/mpi4py/)


Installation
------------

PyMUMPS can be installed from PyPI using pip:

```
pip install pymumps
```

Custom build flags, e.g. to specify the MUMPS installation location,
can be specified using `-C`:

```
pip install -v \
    -Cbuild.verbose=true \
    -Ccmake.define.MUMPS_ROOT=<PATH_OF_MUMPS_INSTALLATION> \
    pymumps
```

There is also conda recipe:

```
conda install -c conda-forge pymumps
```


Examples
--------

Centralized input & output. The sparse matrix and right hand side are
input only on the rank 0 process. The system is solved using all
available processes and the result is available on the rank 0 process.

```python
from mumps import DMumpsContext
ctx = DMumpsContext()
if ctx.myid == 0:
    ctx.set_centralized_sparse(A)
    x = b.copy()
    ctx.set_rhs(x) # Modified in place
ctx.run(job=6) # Analysis + Factorization + Solve
ctx.destroy() # Cleanup
```

Re-use symbolic or numeric factorizations.

```python
from mumps import DMumpsContext
ctx = DMumpsContext()
if ctx.myid == 0:
    ctx.set_centralized_assembled_rows_cols(A.row+1, A.col+1) # 1-based
ctx.run(job=1) # Analysis

if ctx.myid == 0:
    ctx.set_centralized_assembled_values(A.data)
ctx.run(job=2) # Factorization

if ctx.myid == 0:
    x = b1.copy()
    ctx.set_rhs(x)
ctx.run(job=3) # Solve

# Reuse factorizations by running `job=3` with new right hand sides
# or analyses by supplying new values and running `job=2` to repeat
# the factorization process.
```
