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.sparse.linalg, cupyx.scipy.sparse.linalg, and NVIDIA nvmath.sparse 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 and scipy.sparse.linalg 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())

For eigen analysis:

from openseespy_solvers.scipy import eigsh

eig_solver = eigsh()
eigenvalues = ops.eigen("PythonSparse", 5, eig_solver.to_openseespy())

Default Solvers

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

Tutorial and API docs cover wiring, alternatives, and optional backends: openseespy-solvers.readthedocs.io.

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

Project Links

License

BSD 3-Clause. See LICENSE.

Metadata

Release files for openseespy-solvers 0.2.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.2.0
File Size Uploaded
openseespy_solvers-0.2.0.tar.gz 34.5 kB Details

Built distribution (wheel)

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

Total release size: 76.7 kB

Release files / openseespy_solvers-0.2.0.tar.gz

Download URL openseespy_solvers-0.2.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4fe2dc5cb231824c80a770d3e21981a48676183fbec82cc3403be0539f295fd9
BLAKE2b-256 checksum
How to use checksums
0e2466ca52af137c7ec96e3e4fb90aaee1a01145d9c616d584800ed5f0d12eb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL openseespy_solvers-0.2.0-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40af67562decb406713b5ef62d45e82eda771be0c63103d466869b6bddafa883
BLAKE2b-256 checksum
How to use checksums
c6c693b10504f55c8f43758318428a413119677b700ddbe059e32e068a36fdd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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