Resolvent4py
resolvent4py is a parallel Python toolbox to perform
analysis, model reduction and control of high-dimensional linear systems.
It relies on mpi4py for multi-processing parallelism, and it leverages
the functionalities and data structures provided by petsc4py and slepc4py.
The goal of this project is to provide users with a friendly python-like
experience, while also leveraging the high-performance and parallel-computing
capabilities of the PETSc and SLEPc libraries.
The core of the package is an abstract class, called LinearOperator, which
serves as a blueprint for user-defined child classes that can be used to
define any linear operator.
resolvent4py currently ships with 5 linear operator subclasses:
MatrixLinearOperatorLowRankLinearOperatorLowRankUpdatedLinearOperatorProjectionLinearOperatorProductLinearOperator
Once a linear operator is instantiated, resolvent4py currently allows for
several analyses, including:
- Right and left eigendecomposition using Arnoldi iteration (with shift and invert)
- (Randomized) singular value decomposition (SVD)
- Resolvent analysis via randomized SVD (algebraic and with time stepping)
- Harmonic resolvent analysis via algebraic randomized SVD
- Balanced truncation for time-invariant linear systems using frequential Gramians
Additional functionalities (found in resolvent4py/utils) and available
to the user through the resolvent4py namespace are:
- Support for parallel I/O through
petsc4py - Support for MPI communications using
mpi4py - Support for manipulation of PETSc matrices/vector and SLEPc BVs
Documentation
Click here.
Dependencies
Python>=3.10numpyscipymatplotlibmpi4pypetsc4py >= 3.20(must be installed from source, see below)slepc4py >= 3.20(must be installed from source, see below)
Installation instructions
Installing PETSc, SLEPc, petsc4py and slepc4py
Note
If you have an existing parallel build of PETSc and SLEPc and their 4py counterparts configured with complex scalars (i.e.,--with-scalar-type=complex) and with MUMPS (i.e.,--download-mumps) you can skip this subsection and go directly to "Installingresolvent4pyand building the documentation".
All the dependencies above can be installed straightforwardly with pip,
except for petsc4py and slepc4py whose installation is easier if
PETSc and SLEPc are built from source.
- We recommend creating a clean Python environment.
- Download PETSc. Any version >= 3.20.0 should work. (The latest version that we tested is 3.23.3.)
- Configure PETSc using the command below,
./configure PETSC_ARCH=resolvent4py_arch --download-fblaslapack --download-mumps --download-scalapack --download-parmetis --download-metis --download-ptscotch --with-scalar-type=complex --with-debugging=0 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3
If some of the libraries above (e.g.,scalapack,metis, etc.) are already available to the user, then see thePETScconfiguration guidelines for details on how to link against them. - Follow the
PETScinstructions (provided during the configuration step) to build the library. Then make sure to export the environment variablesPETSC_DIRandPETSC_ARCH. - Install SLEPc. Any version >= 3.20.0 should work. (The latest version that we tested was 3.23.1.)
- Install
mpi4py,petsc4pyandslepc4pypip install mpi4py petsc4py==petsc-version slepc4py==slepc-version
- Ensure that the installation was successful by running
python -c "from mpi4py import MPI" python -c "from petsc4py import PETSc" python -c "from slepc4py import SLEPc"
Installing resolvent4py
- Install
resolvent4pywithpip install resolvent4py
- Alternatively, clone the repository into the local directory
resolvent4py, navigate to it and runpip install resolvent4py
Metadata
Release files for resolvent4py 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resolvent4py-1.0.1.tar.gz | 34.9 kB | Without provenance | Details for resolvent4py-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resolvent4py-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for resolvent4py-1.0.1-py3-none-any.whl |
Total release size: 78.5 kB
Release files / resolvent4py-1.0.1.tar.gz
| Download URL | resolvent4py-1.0.1.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e654e0a38aa5fd4dc97f5ac48da3fc3de8847d84b8d57f8a3fde18d21a3c566f
|
|
BLAKE2b-256 checksum How to use checksums |
266a01af39775aa290afa2f69e5e59df5e9edb351bfd892a76f41d1ef9ceedd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Release files / resolvent4py-1.0.1-py3-none-any.whl
| Download URL | resolvent4py-1.0.1-py3-none-any.whl |
|---|---|
| Size | 43.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
108b614c08f3099b1be49abf5fe4160d0ab096e008afa3102ce1f80b5777f5ce
|
|
BLAKE2b-256 checksum How to use checksums |
912184720506510c96743071aaf4d63d1e60d489e0f682b846df494e50ab3af5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Security for resolvent4py 1.0.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.