Skip to main content

openseespy-solvers

SciPy-style sparse linear and eigen solvers for OpenSeesPy PythonSparse.

openseespy-solvers wraps familiar numerical backends such as SciPy, CuPy, and NVIDIA nvMath as solver objects that OpenSeesPy can call directly. OpenSeesPy assembles the stiffness, mass, and right-hand-side arrays; the solver object performs the sparse solve and writes the result back to OpenSeesPy.

Documentation: openseespy-solvers.readthedocs.io

Installation

python -m pip install openseespy-solvers

The base install provides NumPy/SciPy CPU solvers. It requires Python 3.12 or newer.

OpenSeesPy is optional so the package can be used and tested without forcing an OpenSees install. If OpenSeesPy is not already in your environment, install the extra:

python -m pip install "openseespy-solvers[opensees]"

Optional backends:

# CPU UMFPACK direct solver
python -m pip install "openseespy-solvers[umfpack]"

# NVIDIA GPU backends: choose the CUDA generation reported by nvidia-smi
python -m pip install "openseespy-solvers[cuda13]"   # or [cuda12]

On Windows, install UMFPACK with conda-forge instead of pip:

conda install -c conda-forge scikit-umfpack

See the installation guide for platform notes, CUDA 12.x alternatives, and verification steps.

Quick Example

import openseespy.opensees as ops
from openseespy_solvers.scipy import spsolve

solver = spsolve()

# after defining the OpenSeesPy model:
ops.system("PythonSparse", solver.to_openseespy())
ops.numberer("RCM")
ops.constraints("Plain")
ops.integrator("LoadControl", 1.0)
ops.algorithm("Linear")
ops.analysis("Static")
ops.analyze(1)

For eigen analysis:

from openseespy_solvers.scipy import eigsh

eigsolver = eigsh(tol=1e-8)
eigenvalues = ops.eigen("PythonSparse", 5, eigsolver.to_openseespy())

These are good first choices for typical OpenSeesPy analyses:

Analysis CPU NVIDIA GPU
Static or transient linear solve scipy.spsolve; scipy.umfpack for larger CPU systems nvmath.direct_solver
Generalized eigen solve scipy.eigsh cupy.eigsh

Iterative solvers (cg, gmres, lobpcg) and preconditioners are also available when a direct factorization is too expensive or a model benefits from a custom strategy.

More detail: Recommended solvers.

Modules

Module Provides
openseespy_solvers.scipy CPU solvers: spsolve, umfpack, cg, gmres, eigsh, lobpcg
openseespy_solvers.scipy.precond CPU preconditioners: jacobi, ilu, direct
openseespy_solvers.cupy GPU solvers: spsolve, cg, gmres, eigsh, lobpcg
openseespy_solvers.cupy.precond GPU preconditioners: jacobi, ilu, direct
openseespy_solvers.nvmath GPU direct sparse solver: direct_solver
openseespy_solvers.hybrid Direct factorization reused as a GMRES preconditioner

Factory signatures follow the corresponding SciPy/CuPy functions where possible. The matrix and right-hand side are supplied by OpenSeesPy at solve time.

Examples and Development

The pip wheel contains the library. Examples, benchmarks, and tests live in the source repository:

git clone https://github.com/gaaraujo/openseespy-solvers.git
cd openseespy-solvers
python -m pip install -e ".[dev,opensees]"
pytest

Then run a smoke example:

cd examples
python solvers/scipy_spsolve.py
python solvers/scipy_eigsh.py

License

BSD 3-Clause. See LICENSE.

Metadata

Release files for openseespy-solvers 0.1.1

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.1
File Size Uploaded Provenance Actions
openseespy_solvers-0.1.1.tar.gz 32.4 kB Without provenance Details for openseespy_solvers-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 73.8 kB

Release files / openseespy_solvers-0.1.1.tar.gz

Download URL openseespy_solvers-0.1.1.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
56d9bae1d092151897402480a1b1aceaff914b0ee82b67385e8b30520f9e2bef
BLAKE2b-256 checksum
How to use checksums
363cf23ba5edbb3587574253f33e43b0e5a3880dc2665bb4345c2a481cc285f2
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.1-py3-none-any.whl

Download URL openseespy_solvers-0.1.1-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10dd543c6efc65d379ff9b7b38c94aee3f0486c4ee25f5e29e7a0a416a210d20
BLAKE2b-256 checksum
How to use checksums
6870ac3210762683eda43120ddc8329d9df743b907df924efa603d9ac5fe4d56
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.1

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