preCICE-adapter for the open source computing platform FEniCS.
It is recommended to install fenicsprecice from PyPI via
pip3 install --user 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
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 (
pip3 install scipy
)
After cloning this repository and switching to the root directory (fenics-adapter
), run pip3 install --user .
from your shell.
As a first test, try to import the adapter via python3 -c "import fenicsprecice"
.
You can run the other tests via python3 setup.py test
.
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:
python3 -m unittest tests.test_write_read.TestWriteandReadData.test_vector_write
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.
Please refer to our website.
To create and install the fenicsprecice
python package the following instructions were used: How To Package Your Python Code from python-packaging.readthedocs.io.
- 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.
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.