Skip to main content

openseespy-solvers

Sparse linear algebra solvers for OpenSeesPy PythonSparse commands.

Documentation: openseespy-solvers.readthedocs.io

Installation

Requires Python ≥ 3.12, NumPy ≥ 1.26, SciPy ≥ 1.12, and serial OpenSeesPy (parallel/MPI OpenSeesPy builds are not supported — see docs).

Full setup from scratch

Copy-paste overview — see the installation guide for platform notes (UMFPACK, GPU wheels) and the complete verification checklist.

# 1. Environment (conda or venv — all platforms)
conda create -n openseespy-solvers python=3.12 -y
conda activate openseespy-solvers

# 2. Clone (examples and pytest are in the repo, not the pip wheel)
git clone https://github.com/gaaraujo/openseespy-solvers.git
cd openseespy-solvers

# 3. Install
pip install -e ".[dev,opensees]"

# 4–5. Optional backends — UMFPACK, CuPy, nvMath (see installation guide)
# 6. pip check
# 7. Verify
pytest
cd examples && python solvers/scipy_spsolve.py && python solvers/scipy_eigsh.py
python brick_bar.py && python brick_bar_eigen.py

GPU tests in pytest run when CuPy/nvMath are installed; skipped otherwise.

Quick install (library only)

pip install openseespy-solvers
pip install openseespy-solvers[opensees]   # if OpenSeesPy is missing
Analysis GPU (CUDA) CPU
Linear (PythonSparse, static/transient/…) nvmath.direct_solver scipy.spsolve or scipy.umfpack
Eigen cupy.eigsh scipy.eigsh

These PythonSparse backends are often faster than native OpenSees sparse/direct/eigen solvers on medium-to-large models because they use optimized library implementations. Details: recommended solvers.

Example

from openseespy_solvers import hybrid
from openseespy_solvers.scipy import spsolve

solver = hybrid(spsolve(), rtol=1e-6, restart=50)
ops.system("PythonSparse", solver.to_openseespy())
ops.analyze(n)

For Newton or transient steps where the tangent changes slowly, hybrid factorizes once then reuses that factorization as a GMRES preconditioner until the system size changes or GMRES fails to converge.

Submodules

Module Functions
openseespy_solvers.scipy spsolve, umfpack, cg, gmres, eigsh, lobpcg
openseespy_solvers.scipy.precond jacobi, ilu, direct
openseespy_solvers.cupy spsolve, cg, gmres, eigsh, lobpcg (GPU)
openseespy_solvers.cupy.precond jacobi, ilu, direct
openseespy_solvers.nvmath direct_solver (GPU)
openseespy_solvers.hybrid hybrid(direct=...) — frozen factorization + GMRES

Factory signatures match scipy.sparse.linalg and cupyx.scipy.sparse.linalg; A and b are supplied by OpenSees at solve time.

See the tutorial and API reference for details.

GitHub

Repository: github.com/gaaraujo/openseespy-solvers. Report bugs and ask questions via issues; send contributions (pull requests) there as well.

License

BSD 3-Clause — see LICENSE.

Metadata

Release files for openseespy-solvers 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openseespy-solvers 0.1.0
File Size Uploaded Provenance Actions
openseespy_solvers-0.1.0.tar.gz 33.0 kB Without provenance Details for openseespy_solvers-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openseespy-solvers 0.1.0
File Interpreter ABI Platform Actions
openseespy_solvers-0.1.0-py3-none-any.whl Python 3 none any Details for openseespy_solvers-0.1.0-py3-none-any.whl

Total release size: 74.1 kB

Release files / openseespy_solvers-0.1.0.tar.gz

Download URL openseespy_solvers-0.1.0.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1a79e7555a3932adf09e554125f8be0cf11e02f477ace4c6d96b49b6a3436c11
BLAKE2b-256 checksum
How to use checksums
38ad6be2ac64e21d064dd5e42389ca52fc253f26b04b1cb7b095d98cc02d3d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / openseespy_solvers-0.1.0-py3-none-any.whl

Download URL openseespy_solvers-0.1.0-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2a5582911f503fba92c4add51933f82ac3c5cc7784904a0e7545538e2464644
BLAKE2b-256 checksum
How to use checksums
e485fc73d7239e9db89d5b6d8e259ac501a1d9f3199d5fd032833a8cff41664b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Security for openseespy-solvers 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page