Parallel Parameter Fields for Uncertainty Quantification
Project description
Welcome to parafields
parafields
is a Python package that provides Gaussian random fields
based on circulant embedding. Core features are:
- Large variety of covariance functions: exponential, Gaussian, Matérn, spherical and cubic covariance functions, among others
- Generation of distributed fields using domain decomposition
and MPI through
mpi4py
- Uses
numpy
data structures to ease integration with the Python ecosystem of scientific software - Optional caching of matrix-vector products
- Easy integration into e.g. FEniCSx-based PDE solvers (Example that is currently not tested as part of our CI)
parafields
implements these features through Python bindings to the parafields-core C++ library.
The following options are supported in the backend but not yet in the Python bindings:
- axiparallel and full geometric anisotropy
- value transforms like log-normal, folded normal, or sign function (excursion set)
- Coarsening and refinement of random fields for multigrid/-scale methods
Installation
parafields
is available from PyPI and can be installed using pip
:
python -m pip install parafields
This will install a sequential, pre-compiled version of parafields
.
In order to use parafields
in an MPI-parallel context, you need to
instead build the package from source:
python -m pip install --no-binary parafields -v parafields
This will build the package from source and link against your system MPI.
Additionally, parafields
defines the following optional dependency sets:
jupyter
: All requirements for an interactive Jupyter interface toparafields
tests
: All requirements for runningparafields
's unit testsdocs
: All requirements for buildingsparafields
's Sphinx documentation
These optional dependencies can be installed by installing e.g. parafields[jupyter]
.
Usage
This is a minimal usage example of the parafields
package:
For more examples, check out the parafields documentation.
Reporting Issues
If you need support with parafields
or found a bug, consider a bug on
the issue tracker.
Contributing
parafields
welcomes external contributions. For the best possible contributor
experience, consider opening an issue on the issue tracker
before you start developing. Announcing your intended development in this way allows us to clarify
whether it is in the scope of the package. Contributions are then done via a pull
request on the GitHub repository. Please also add your name to the list of copyright holders.
For a development installation of parafields
, use the following instructions:
git clone https://github.com/parafields/parafields.git
cd parafields
python -m pip install -v --editable .[tests,docs,jupyter]
Before contributing, make sure that the unit tests pass and that new functionality is covered by unit tests. The unit tests can be run using pytest:
# Sequential tests
python -m pytest
# Parallel tests
mpirun --oversubscribe -np 4 python -m pytest --only-mpi
In order to locally build the Sphinx documentation, use the following commands:
sphinx-build -t html ./doc ./html
Acknowledgments
The parafields-core C++ library is work by Ole Klein whichis supported by the federal ministry of education and research of Germany (Bundesministerium für Bildung und Forschung) and the ministry of science, research and arts of the federal state of Baden-Württemberg (Ministerium für Wissenschaft, Forschung und Kunst Baden-Württemberg).
The Python bindings are realized by the Scientific Software Center of Heidelberg University. The Scientific Software Center is funded as part of the Excellence Strategy of the German Federal and State Governments.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for parafields-1.0.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb87eb4ab56937e873a376aad1cfee91c0347a31cda331e41d80a748d03b4638 |
|
MD5 | c95aadb6b5b9155b9335faed514ad705 |
|
BLAKE2b-256 | d319f4b2b34f4601e8b17ccb2da22f770931de3e375b9f1ad914808f24a0eed8 |
Hashes for parafields-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a04f6cf3044b71ec93f9b783f90c682b2564c892483e06da712c5bb5e1fb45d5 |
|
MD5 | 41a3952a1f4206a38fdb305fcf6c4a43 |
|
BLAKE2b-256 | 9d5936a2206d50f2bcb86dc388b7a66d438f1a98a3f69f7acfedc16746dc1d3c |
Hashes for parafields-1.0.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ade035f5bc74e3abd65944f6c5a64d23992fd9cc9231e36b3a6f527c72c681b |
|
MD5 | 9950b95751f7f8573e93cda1d50efa75 |
|
BLAKE2b-256 | 4c45e606a7453c3cb1dd131d68ecdc76a5aaef4d735ec9bcc269f9c88f1566bd |
Hashes for parafields-1.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ccac3d3897b07d35cf51857b23a3a3706e145bfa062ee76298a9604676594a |
|
MD5 | 15499bc6a28fad26d1073fc9cfbfa99b |
|
BLAKE2b-256 | daa7706addbf75dcdbf059cd9d92442e137cd4d54e1bbbbeb639d471adfa0359 |
Hashes for parafields-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d701b821a0d1a2c1342acaad3706649c17fbd3283eaf49d240b189706a1b5c0 |
|
MD5 | 6c06c3e4baa6e7b5d0cd4610207b6a7c |
|
BLAKE2b-256 | 0431a77eb25a970afd55224476be48e43d05241068e0df9663ec9d80fc0277fa |
Hashes for parafields-1.0.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac6b62e3da7b6c160d1fa72fa4a6f51f0b5c8dbfb94fe94950f60d093a9e07ff |
|
MD5 | 7935deef4af12786b86c86dc2baa4cae |
|
BLAKE2b-256 | 4dc88e8fe567234d9df968de1e5f2ecf84f95ba3b77fe7cdb4be2a1a40c308f1 |
Hashes for parafields-1.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a47e5214926e8014c47b1c1b7486da56a0ed021fb2a6c173ae87aa10894245ee |
|
MD5 | 9a6fabc54e578dfec7ffd4071a993f22 |
|
BLAKE2b-256 | 20eb0beb311af156ba291209de3408733dce68ead1240b9a9a065e79c1359831 |
Hashes for parafields-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05fc978d8541a34e6172a91f342eeaa10f087657c91c40083710a176d36edd26 |
|
MD5 | 5b848227f8ef25cd5c83f5f66e6e4f43 |
|
BLAKE2b-256 | f2641ab1111a980aff0dbcddeaa9cecb621256ebbf063ef9ff1961a56c165623 |
Hashes for parafields-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a2ac3b5418c2fa7df5c1dd893727026905358e042213e4e0ae81a25e7515cb |
|
MD5 | 0e03cf1097a2773a682d6a852ea68fbd |
|
BLAKE2b-256 | 0edc744c0a81769ddc9051cb43717fac22a07b8be180901b51ecc193b92455aa |
Hashes for parafields-1.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5c915ada2b44f8b562e81f6a59cd3acb4eb646ca60fcf520cc0c39800c53538 |
|
MD5 | d1a2ffa676d70cccfbd1a4e02f8d43a4 |
|
BLAKE2b-256 | d4d5fa809ebd148634b023b2d19a84bca367d774341ee328a9bc0ddf08b77ae7 |
Hashes for parafields-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 054e8d5e892e8f873eb344b284b1242432d91dc9f788c0da57b31818d075a271 |
|
MD5 | f9f843111edb162f921470453925813a |
|
BLAKE2b-256 | d29ca689019b355ce6d1b6cb6735063550cc69317d4a8453141dd1cc3304498c |
Hashes for parafields-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e54e287725fab1bbf6ee3e8c34cfb4495d0d10b9f5c81d070df88fa83ad73e |
|
MD5 | eb98d5936a64359d3cd12860dfeb027f |
|
BLAKE2b-256 | 68df17ce41cdffb3c09ff61cbba8d6d70d71088870c4d54fe415af1200ddb926 |
Hashes for parafields-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 393632e7a65c7f1481ada05353c040f08f85954f01062c2befcfe3c92985b5e3 |
|
MD5 | 1ba18e16297a390d7f0cfe0236465905 |
|
BLAKE2b-256 | 0cb8180ddfe5ab06becea36f21f600de04c6bbffe493e16a9780a2b10c8e675f |
Hashes for parafields-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9d0ba60c108d993abb5f23dd971d07532ede6e88eb94a57a816dd00661c4f31 |
|
MD5 | 0595d6628086fa22030cfbed89f031ea |
|
BLAKE2b-256 | 3038013f3d4ea8acc763106049b279a2cf2dcdbcb8dcf94d2ee30d03222e4e06 |
Hashes for parafields-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7efaa46614cc8c23bee804c67b8a0120eb6117c025ae099f0c20b11951d2c540 |
|
MD5 | dc811bff93cc83853d0f3d289227ce01 |
|
BLAKE2b-256 | 5f5d3a38ef95497e2765ea321fa841c98210c555bb4b40162c0cb92babcd5b49 |