FEniCS-preCICE adapter is a preCICE adapter for the open source computing platform FEniCS.
Project description
FEniCS-preCICE adapter
preCICE-adapter for the open source computing platform FEniCS.
Installing the package
Generally, we recommend to create a virtual environment and install the package there. The following commands will create the virtual environment .venv:
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
You can replace .venv with path/of/your/venv/venv_name if you want to create the virtual environment somewhere else. The command --system-site-packages will allow the virtual environment to access the FEniCS installation on your system. Refer to the Python documentation for further details on virtual environments.
If you do not want to use a virtual environment, you might encounter the error: externally-managed-environment during installation of the adapter; this depends on your pip version and operating system. You can read why this error shows up in the documentation.
Using pip to install from PyPI
It is recommended to install fenicsprecice from PyPI via
pip install fenicsprecice
This should work out of the box, if all dependencies are installed correctly. If you face problems during installation or you want to run the tests, see below for a list of dependencies and alternative installation procedures
Clone this repository and use pip
Required dependencies
Make sure to install the following dependencies:
- preCICE
- python3 (this adapter only supports python3)
- the python language bindings for preCICE
- FEniCS (with Python interface, installed by default)
- and scipy (
pip install scipy)
Build and install the adapter
After cloning this repository and switching to the root directory (fenics-adapter), run pip install . from your shell.
Test the adapter
As a first test, try to import the adapter via python3 -c "import fenicsprecice".
You can run the other tests via tox.
If you want to run them separately, use tox -e unit and tox -e integration respectively.
Single tests can be also be run. For example the test test_vector_write in the file test_write_read.py can be run as follows:
tox -e all -- tests/integration/test_write_read.py::TestWriteandReadData::test_vector_write
Troubleshooting
FEniCS is suddenly broken: There are two known issues with preCICE, fenicsprecice and FEniCS:
- If you see
ImportError: cannot import name 'sub_forms_by_domain'runpip3 uninstall -y fenics-ufl. For details, refer to issue #103. - If you see
ImportError: cannot import name 'cellname2facetname' from 'ufl.cell', refer to issue #154. - If you see
ModuleNotFoundError: No module named 'dolfin'and have installed PETSc from source, refer to this forum post. Short version: Try to use the PETSc that comes with your system, if possible. Note that you can also compile preCICE without PETSc, if necessary.
If this does not help, you can contact us on gitter or open an issue.
Use the adapter
Please refer to our website.
Packaging
To create and install the fenicsprecice Python package the following instructions were used: "How To Package Your Python Code" from python-packaging.readthedocs.io.
Citing
- FEniCS-preCICE: If you are using this adapter (
fenics-adapter), please refer to the citing information on the FEniCS adapter. - preCICE: preCICE is an academic project, developed at the Technical University of Munich and at the University of Stuttgart. If you use preCICE, please cite preCICE.
- FEniCS: If you are using FEniCS, please also consider the information on the official FEniCS website on citing.
Development history
The initial version of this adapter was developed by Benjamin Rodenberg during his research stay at Lund University in the group for Numerical Analysis (Philipp Birken) in close collaboration with Peter Meisrimel.
Richard Hertrich contributed the possibility to perform FSI simulations using the adapter in his Bachelor thesis.
Ishaan Desai improved the user interface and extended the adapter to allow for parallel FEniCS computations and 3D cases in certain scenarios.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fenicsprecice-2.3.0.tar.gz.
File metadata
- Download URL: fenicsprecice-2.3.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c94103aef9b4204ea8975c16d64f37d76a7e4cc5e2fb858ad0f74e6a444f01a9
|
|
| MD5 |
d9e27b588718f0de738765f59c1bdc94
|
|
| BLAKE2b-256 |
0262cb49818f1e42edea4d85e04b42ba02b6fadb5781045849b1deef58729cf6
|
Provenance
The following attestation bundles were made for fenicsprecice-2.3.0.tar.gz:
Publisher:
release.yml on precice/fenics-adapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fenicsprecice-2.3.0.tar.gz -
Subject digest:
c94103aef9b4204ea8975c16d64f37d76a7e4cc5e2fb858ad0f74e6a444f01a9 - Sigstore transparency entry: 957444952
- Sigstore integration time:
-
Permalink:
precice/fenics-adapter@697ab6f4fe7f1c436c074c54897a3ea5c9136729 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/precice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@697ab6f4fe7f1c436c074c54897a3ea5c9136729 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fenicsprecice-2.3.0-py3-none-any.whl.
File metadata
- Download URL: fenicsprecice-2.3.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8b8980ac2de58fee64816efdeadf82316452b0b677df27a998c7e3450044b3c
|
|
| MD5 |
155f2940886418bb6d3bbbeb13a0b56f
|
|
| BLAKE2b-256 |
ec3e7f9e9ebb4dab1e25368c4ece612de7e2450fa9b47d0f60320e7bbf45e9d8
|
Provenance
The following attestation bundles were made for fenicsprecice-2.3.0-py3-none-any.whl:
Publisher:
release.yml on precice/fenics-adapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fenicsprecice-2.3.0-py3-none-any.whl -
Subject digest:
f8b8980ac2de58fee64816efdeadf82316452b0b677df27a998c7e3450044b3c - Sigstore transparency entry: 957444956
- Sigstore integration time:
-
Permalink:
precice/fenics-adapter@697ab6f4fe7f1c436c074c54897a3ea5c9136729 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/precice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@697ab6f4fe7f1c436c074c54897a3ea5c9136729 -
Trigger Event:
push
-
Statement type: