mumpspy


Namemumpspy JSON
Version 1.3.3 PyPI version JSON
download
home_pageNone
SummaryMUMPS for Python
upload_time2024-11-12 14:13:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2018 Vladimir Lukes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords sparse solver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            MUMPSpy
=======

A python wrapper for the sparse direct solver.

The wrapper allows:

* real and complex factorization of symmetric or non-symmetric matrices
* Schur complement calculation

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

* [MUMPS](http://mumps-solver.org) - MUltifrontal Massively Parallel sparse
  direct Solver
* [mpi4py](http://mpi4py.scipy.org/) - Python bindings for MPI

Ubuntu/Debian users can use the following command to install the required
packages:

    apt-get install python-mpi4py libmumps-dev

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

      pip install mumpspy

Usage
-----

```python
import mumpspy
import numpy as np
import scipy.sparse as sp

row = np.array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3])
col = np.array([0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 0, 1])
val = np.array([1, 2, 2, 1, 1, 3, -1, 2, 1, 1, 3, 1], dtype='d')
b = np.array([15, 12, 3, 5], dtype='d')

A = sp.coo_matrix((val, (row, col)), shape=(4, 4))

solver = mumpspy.MumpsSolver()  # initialize solver, real-valued system
solver.set_mtx(A)  # set sparse matrix
x = solver.solve(b)  # solve system for a given right-hand side
print(x)
```

Compatibility
-------------

Tested for the following MUMPS library versions:

* 4.10.0
* 5.0.2
* 5.1.2
* 5.2.1
* 5.4.1
* 5.6.1

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mumpspy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "sparse, solver",
    "author": null,
    "author_email": "Vladim\u00edr Luke\u0161 <vlukes@kme.zcu.cz>",
    "download_url": "https://files.pythonhosted.org/packages/15/0a/2b1dcbf1e92e5532e659c3d138d4026aab5ec844d26581c9b5b1bd72484e/mumpspy-1.3.3.tar.gz",
    "platform": null,
    "description": "MUMPSpy\n=======\n\nA python wrapper for the sparse direct solver.\n\nThe wrapper allows:\n\n* real and complex factorization of symmetric or non-symmetric matrices\n* Schur complement calculation\n\nRequirements\n------------\n\n* [MUMPS](http://mumps-solver.org) - MUltifrontal Massively Parallel sparse\n  direct Solver\n* [mpi4py](http://mpi4py.scipy.org/) - Python bindings for MPI\n\nUbuntu/Debian users can use the following command to install the required\npackages:\n\n    apt-get install python-mpi4py libmumps-dev\n\nInstallation\n------------\n\n      pip install mumpspy\n\nUsage\n-----\n\n```python\nimport mumpspy\nimport numpy as np\nimport scipy.sparse as sp\n\nrow = np.array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3])\ncol = np.array([0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 0, 1])\nval = np.array([1, 2, 2, 1, 1, 3, -1, 2, 1, 1, 3, 1], dtype='d')\nb = np.array([15, 12, 3, 5], dtype='d')\n\nA = sp.coo_matrix((val, (row, col)), shape=(4, 4))\n\nsolver = mumpspy.MumpsSolver()  # initialize solver, real-valued system\nsolver.set_mtx(A)  # set sparse matrix\nx = solver.solve(b)  # solve system for a given right-hand side\nprint(x)\n```\n\nCompatibility\n-------------\n\nTested for the following MUMPS library versions:\n\n* 4.10.0\n* 5.0.2\n* 5.1.2\n* 5.2.1\n* 5.4.1\n* 5.6.1\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2018 Vladimir Lukes  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "MUMPS for Python",
    "version": "1.3.3",
    "project_urls": {
        "homepage": "https://github.com/vlukes/mumpspy"
    },
    "split_keywords": [
        "sparse",
        " solver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc828af9353f9a8a22b8509782da594d8900a9ff548bb2f1dda4f36da292dcc4",
                "md5": "3686b51aec4a21b28566af158697f24e",
                "sha256": "7094e42d9b6a5f03e2f374c26bf73ee69beb9793aca2fd3177df737bbeacb00d"
            },
            "downloads": -1,
            "filename": "mumpspy-1.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3686b51aec4a21b28566af158697f24e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8579,
            "upload_time": "2024-11-12T14:13:46",
            "upload_time_iso_8601": "2024-11-12T14:13:46.192408Z",
            "url": "https://files.pythonhosted.org/packages/dc/82/8af9353f9a8a22b8509782da594d8900a9ff548bb2f1dda4f36da292dcc4/mumpspy-1.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "150a2b1dcbf1e92e5532e659c3d138d4026aab5ec844d26581c9b5b1bd72484e",
                "md5": "97692c58b2df97e8335dd9fda03eb9e1",
                "sha256": "d8ea6b6f838d4e7edec7da0c3b799a60025035b3b4829dad317876c1d1f61351"
            },
            "downloads": -1,
            "filename": "mumpspy-1.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "97692c58b2df97e8335dd9fda03eb9e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8492,
            "upload_time": "2024-11-12T14:13:47",
            "upload_time_iso_8601": "2024-11-12T14:13:47.181829Z",
            "url": "https://files.pythonhosted.org/packages/15/0a/2b1dcbf1e92e5532e659c3d138d4026aab5ec844d26581c9b5b1bd72484e/mumpspy-1.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 14:13:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vlukes",
    "github_project": "mumpspy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mumpspy"
}
        
Elapsed time: 5.06296s