From 218f4d6f990e95d7acb04899071bee8f4cc72ab4 Mon Sep 17 00:00:00 2001 From: BenjaminRodenberg Date: Sun, 10 Jan 2021 20:43:01 +0100 Subject: [PATCH 01/20] Add placeholder in CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a554bea7..4f2e1622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # FEniCS-preCICE adapter changelog +## latest + ## 1.0.1 * Bugfix for PointSources https://github.com/precice/fenics-adapter/issues/109 From b7680edbacb80accbee255811ea24cc7ba496e20 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Mon, 11 Jan 2021 10:56:50 +0100 Subject: [PATCH 02/20] Add test for HT tutorials (#115) --- .github/workflows/run-tutorials.yml | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/run-tutorials.yml diff --git a/.github/workflows/run-tutorials.yml b/.github/workflows/run-tutorials.yml new file mode 100644 index 00000000..0e28d6e3 --- /dev/null +++ b/.github/workflows/run-tutorials.yml @@ -0,0 +1,56 @@ +name: Run preCICE Tutorials +on: + push: + branches: + - master + - develop + pull_request: + paths: + - '**' + +jobs: + run_ht_simple: + name: Run HT, simple + runs-on: ubuntu-latest + container: precice/precice + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Install Dependencies & FEniCS + run: | + apt-get -qq update + apt-get -qq install software-properties-common python3-dev python3-pip git apt-utils + add-apt-repository -y ppa:fenics-packages/fenics + apt-get -qq install --no-install-recommends fenics + rm -rf /var/lib/apt/lists/* + - name: Install adapter + run: pip3 install --user . + - name: Fix broken FEniCS installation (see https://fenicsproject.discourse.group/t/installing-python-package-with-fenics-dependency-breaks-fenics-installation/4476) + run: pip3 uninstall -y fenics-ufl + - name: Get tutorials + run: git clone -b develop https://github.com/precice/tutorials.git + - name: Run tutorial + run: python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -d & python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -n + + run_ht_complex: + name: Run HT, complex + runs-on: ubuntu-latest + container: precice/precice + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Install Dependencies & FEniCS + run: | + apt-get -qq update + apt-get -qq install software-properties-common python3-dev python3-pip git apt-utils + add-apt-repository -y ppa:fenics-packages/fenics + apt-get -qq install --no-install-recommends fenics + rm -rf /var/lib/apt/lists/* + - name: Install adapter + run: pip3 install --user . + - name: Fix broken FEniCS installation (see https://fenicsproject.discourse.group/t/installing-python-package-with-fenics-dependency-breaks-fenics-installation/4476) + run: pip3 uninstall -y fenics-ufl + - name: Get tutorials + run: git clone -b develop https://github.com/precice/tutorials.git + - name: Run tutorial + run: python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -d -i complex & python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -n -i complex From 6c8994a8820d6ea05f9da2b29afe7bba4d8630ae Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 19 Jan 2021 22:32:35 +0100 Subject: [PATCH 03/20] Update ReleaseGuide.md Apply naming scheme repo-vX.X.X for release branch --- docs/ReleaseGuide.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/ReleaseGuide.md b/docs/ReleaseGuide.md index 92d1357f..ccdd2024 100644 --- a/docs/ReleaseGuide.md +++ b/docs/ReleaseGuide.md @@ -1,22 +1,23 @@ ## Guide to release new version of the FEniCS-preCICE adapter -The developer who is releasing a new version of FEniCS-preCICE adapter is expected to follow this work flow +Before starting this process make sure to check that all relevant changes are included in the `CHANGELOG.md`. The developer who is releasing a new version of FEniCS-preCICE adapter is expected to follow this workflow: -1. If it does not already exist, create a release branch with the version number of the planned release. Use develop as base for the branch. `git checkout develop`; `git checkout -b release_vX.X.X`. Perform the following steps only on the release branch, if not indicated differently. +1. If it does not already exist, create a release branch with the version number of the planned release. Use develop as base for the branch. `git checkout develop`; `git checkout -b fenics-adapter-vX.X.X`. Perform the following steps only on the release branch, if not indicated differently. -2. [Open a Pull Request from the branch `release_vX.X.X` to `master`](https://github.com/precice/fenics-adapter/compare) named after the version (i.e. `Release v1.0.0`) and briefly describe the new features of the release in the PR description. +2. [Open a Pull Request from the branch `fenics-adapter-vX.X.X` to `master`](https://github.com/precice/fenics-adapter/compare) named after the version (i.e. `Release v1.0.0`) and briefly describe the new features of the release in the PR description. - a) Check `CHANGELOG.md`, if necessary, update `CHANGELOG.md` on `develop` and merge into `release_vX.X.X` - - b) Before merging the PR, make sure to bump the version in `CHANGELOG.md` on `release_vX.X.X` +3. Bump the version in the following places: -3. [Draft a New Release](https://github.com/precice/fenics-adapter/releases/new) in the `Releases` section of the repository page in a web browser. The release tag needs to be the exact version number (i.e.`v1.0.0` or `v1.0.0rc1`, compare to [existing tags](https://github.com/precice/fenics-adapter/tags)). Use `@target:master`. Release title is also the version number (i.e. `v1.0.0` or `v1.0.0rc1`, compare to [existing releases](https://github.com/precice/fenics-adapter/tags)). -*Note:* If it is a pre-release then the option *This is a pre-release* needs to be selected at the bottom of the page. Use `@target:release_vX.X.X` for a pre-release, since we will never merge a pre-release into master. + a) Before merging the PR, make sure to bump the version in `CHANGELOG.md` on `fenics-adapter-vX.X.X` + b) There is no need to bump the version anywhere else, since we use the [python-versioneer](https://github.com/python-versioneer/python-versioneer/) for maintaining the version everywhere else. + +4. [Draft a New Release](https://github.com/precice/fenics-adapter/releases/new) in the `Releases` section of the repository page in a web browser. The release tag needs to be the exact version number (i.e.`v1.0.0` or `v1.0.0rc1`, compare to [existing tags](https://github.com/precice/fenics-adapter/tags)). Use `@target:master`. Release title is also the version number (i.e. `v1.0.0` or `v1.0.0rc1`, compare to [existing releases](https://github.com/precice/fenics-adapter/tags)). +*Note:* If it is a pre-release then the option *This is a pre-release* needs to be selected at the bottom of the page. Use `@target:fenics-adapter-vX.X.X` for a pre-release, since we will never merge a pre-release into master. a) If a pre-release is made: Directly hit the "Publish release" button in your Release Draft. Now you can check the artifacts (e.g. release on [PyPI](https://pypi.org/project/fenicsprecice/#history)) of the release. *Note:* As soon as a new tag is created github actions will take care of deploying the new version on PyPI using [this workflow](https://github.com/precice/fenics-adapter/actions?query=workflow%3A%22Upload+Python+Package%22). - b) If this is a "real" release: As soon as one approving review is made, merge the release PR (`release_vX.X.X`) into `master`. + b) If this is a "real" release: As soon as one approving review is made, merge the release PR (`fenics-adapter-vX.X.X`) into `master`. -4. Merge `master` into `develop` for synchronization of `develop`. +5. Merge `master` into `develop` for synchronization of `develop`. -5. If everything is in order up to this point then the new version can be released by hitting the "Publish release" button in your Release Draft. +6. If everything is in order up to this point then the new version can be released by hitting the "Publish release" button in your Release Draft. From fa721cc2f39a72e6ba27f28662bbb59b3ecdbada Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Fri, 5 Feb 2021 18:18:32 +0100 Subject: [PATCH 04/20] Add troubleshooting hints. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index b3025205..c64536e2 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,15 @@ Single tests can be also be run. For example the test `test_vector_write` in the python3 -m unittest tests.test_write_read.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'`, refer to [issue #103](https://github.com/precice/fenics-adapter/issues/103). +* If you see `ModuleNotFoundError: No module named 'dolfin'` and have installed PETSc from source, refer to [this forum post](https://fenicsproject.discourse.group/t/modulenotfounderror-no-module-named-dolfin-if-petsc-dir-is-set/4407). Short version: Try to use the PETSc that comes with your system, if possible. Note that you can also [compile preCICE without PETSc](https://www.precice.org/installation-source-configuration.html), if necessary. + +If this does not help, you can contact us on [gitter](https://gitter.im/precice/lobby) or [open an issue](https://github.com/precice/fenics-adapter/issues/new). + # Use the adapter Add ``from fenicsprecice import Adapter`` in your FEniCS code. Please refer to the examples in the [tutorials repository](https://github.com/precice/tutorials) for usage examples: From bf1df45624dfea4c5d0d72a9fa4a1755578b7420 Mon Sep 17 00:00:00 2001 From: BenjaminRodenberg Date: Sat, 6 Feb 2021 17:20:55 +0100 Subject: [PATCH 05/20] Add generic author. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5498df3e..0ca92732 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,8 @@ long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/precice/fenics-adapter', - author="Benjamin Rueth", - author_email='benjamin.rueth@tum.de', + author='the preCICE developers', + author_email='info@precice.org', license='LGPL-3.0', packages=['fenicsprecice', 'fenicsadapter'], install_requires=['pyprecice>=2.0.0', 'fenics', 'scipy', 'numpy>=1.13.3', 'mpi4py'], From da52df62465e759ff2f27a8200425de73ce2ca2b Mon Sep 17 00:00:00 2001 From: Benjamin Uekermann Date: Tue, 16 Mar 2021 11:31:25 +0100 Subject: [PATCH 06/20] Update contact information from mailing list to forum --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c64536e2..5d8f6105 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ FEniCS-preCICE adapter preCICE-adapter for the open source computing platform FEniCS -_**Note:** This adapter is currently purely expermental and limited in functionality. If you are interested in using it or you want to contribute, feel free to contact us via the [preCICE mailing list](https://mailman.informatik.uni-stuttgart.de/mailman/listinfo/precice)._ +_**Note:** This adapter is currently purely expermental and limited in functionality. If you are interested in using it or you want to contribute, feel free to contact us via the [preCICE Forum](https://precice.discourse.group/)._ **currently only supports 2D simulations in FEniCS** From be1b49de1adb3fef61b496ee84cd0183fed6a335 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 16 Mar 2021 12:30:53 +0100 Subject: [PATCH 07/20] Add troubleshooting remark #103 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d8f6105..0d6883f6 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ 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'`, refer to [issue #103](https://github.com/precice/fenics-adapter/issues/103). +* If you see `ImportError: cannot import name 'sub_forms_by_domain'` run `pip3 uninstall -y fenics-ufl`. For details, refer to [issue #103](https://github.com/precice/fenics-adapter/issues/103). * If you see `ModuleNotFoundError: No module named 'dolfin'` and have installed PETSc from source, refer to [this forum post](https://fenicsproject.discourse.group/t/modulenotfounderror-no-module-named-dolfin-if-petsc-dir-is-set/4407). Short version: Try to use the PETSc that comes with your system, if possible. Note that you can also [compile preCICE without PETSc](https://www.precice.org/installation-source-configuration.html), if necessary. If this does not help, you can contact us on [gitter](https://gitter.im/precice/lobby) or [open an issue](https://github.com/precice/fenics-adapter/issues/new). From c9cfbba10fc7a4f5a29eef45d5c7397aea013d5e Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Wed, 24 Mar 2021 14:31:11 +0100 Subject: [PATCH 08/20] Update README and provide references Refer to paper and website. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0d6883f6..1fdf9990 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,6 @@ FEniCS-preCICE adapter preCICE-adapter for the open source computing platform FEniCS -_**Note:** This adapter is currently purely expermental and limited in functionality. If you are interested in using it or you want to contribute, feel free to contact us via the [preCICE Forum](https://precice.discourse.group/)._ - **currently only supports 2D simulations in FEniCS** This adapter was developed by [Benjamin Rüth](https://www5.in.tum.de/wiki/index.php/Benjamin_R%C3%BCth,_M.Sc._(hons)) during his research stay at Lund University in the group for [Numerical Analysis](http://www.maths.lu.se/english/research/research-divisions/numerical-analysis/) in close collaboration with [Peter Meisrimel](https://www.lunduniversity.lu.se/lucat/user/09d80f0367a060bcf2a22d7c22e5e504). @@ -64,9 +62,7 @@ If this does not help, you can contact us on [gitter](https://gitter.im/precice/ # Use the adapter -Add ``from fenicsprecice import Adapter`` in your FEniCS code. Please refer to the examples in the [tutorials repository](https://github.com/precice/tutorials) for usage examples: - -The adapter is configured via a `json` configuration file. For example configuration files and usage refer to the tutorials ([fenics-fenics](https://github.com/precice/tutorials/tree/master/HT/partitioned-heat/fenics-fenics)). +Please refer to [our website](https://www.precice.org/adapter-fenics.html#how-can-i-use-my-own-solver-with-the-adapter-). # Packaging @@ -74,6 +70,8 @@ To create and install the `fenicsprecice` python package the following instructi # Citing +If you are using this adapter, please refer to the [citing information on the FEniCS adapter](https://www.precice.org/adapter-fenics.html#how-to-cite). + preCICE is an academic project, developed at the [Technical University of Munich](https://www5.in.tum.de/) and at the [University of Stuttgart](https://www.ipvs.uni-stuttgart.de/). If you use preCICE, please [cite us](https://www.precice.org/publications/): *H.-J. Bungartz, F. Lindner, B. Gatzhammer, M. Mehl, K. Scheufele, A. Shukaev, and B. Uekermann: preCICE - A Fully Parallel Library for Multi-Physics Surface Coupling. Computers and Fluids, 141, 250–258, 2016.* From 567427af7a37e2cce9b65230cfe6d6318706e893 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Thu, 8 Apr 2021 13:46:36 +0200 Subject: [PATCH 09/20] Update CI (#118) Following changes introduced in https://github.com/precice/tutorials/commit/caa5ad0466b6728ba1e598af9c138bd4ec776f13 --- .github/workflows/run-tutorials.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tutorials.yml b/.github/workflows/run-tutorials.yml index 0e28d6e3..2ac02790 100644 --- a/.github/workflows/run-tutorials.yml +++ b/.github/workflows/run-tutorials.yml @@ -30,7 +30,9 @@ jobs: - name: Get tutorials run: git clone -b develop https://github.com/precice/tutorials.git - name: Run tutorial - run: python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -d & python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -n + run: | + cd tutorials/partitioned-heat-conduction/fenics + python3 heat.py -d & python3 heat.py -n run_ht_complex: name: Run HT, complex @@ -53,4 +55,6 @@ jobs: - name: Get tutorials run: git clone -b develop https://github.com/precice/tutorials.git - name: Run tutorial - run: python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -d -i complex & python3 tutorials/HT/partitioned-heat/fenics-fenics/heat.py -n -i complex + run: | + cd tutorials/partitioned-heat-conduction-complex/fenics + python3 heat.py -d -i complex & python3 heat.py -n -i complex From 144def13466e5b50a416b3f3917f42af0c7a024a Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Thu, 8 Apr 2021 13:56:44 +0200 Subject: [PATCH 10/20] Move collaborators down, update Benjamin Rodenberg --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fdf9990..5fa25cf0 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ preCICE-adapter for the open source computing platform FEniCS **currently only supports 2D simulations in FEniCS** -This adapter was developed by [Benjamin Rüth](https://www5.in.tum.de/wiki/index.php/Benjamin_R%C3%BCth,_M.Sc._(hons)) during his research stay at Lund University in the group for [Numerical Analysis](http://www.maths.lu.se/english/research/research-divisions/numerical-analysis/) in close collaboration with [Peter Meisrimel](https://www.lunduniversity.lu.se/lucat/user/09d80f0367a060bcf2a22d7c22e5e504). - # Installing the package ## Using pip3 to install from PyPI @@ -81,3 +79,12 @@ If you are using FEniCS, please also consider the information on https://fenicsp # Disclaimer This offering is not approved or endorsed by the FEniCS Project, producer and distributor of the FEniCS software via https://fenicsproject.org/. + +# Development history + +The initial version of this adapter was developed by [Benjamin Rodenberg](https://www.in.tum.de/i05/personen/personen/benjamin-rodenberg/) during his research stay at Lund University in the group for [Numerical Analysis](http://www.maths.lu.se/english/research/research-divisions/numerical-analysis/) in close collaboration with [Peter Meisrimel](https://www.lunduniversity.lu.se/lucat/user/09d80f0367a060bcf2a22d7c22e5e504). + +[Richard Hertrich](https://github.com/richahert) contributed the possibility to perform FSI simulations using the adapter in his [Bachelor thesis](https://mediatum.ub.tum.de/node?id=1520579). + +[Ishaan Desai](https://www.ipvs.uni-stuttgart.de/institute/team/Desai/) improved the user interface and extended the adapter to also allow for parallel FEniCS computations. + From 61178dba7d0dacc5514a05160e478e24b597aaa1 Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Thu, 8 Apr 2021 13:57:58 +0200 Subject: [PATCH 11/20] Remove FEniCS as requirement (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting fenics as install requirement may break the installation (see #103). We therefore check whether FEniCS is installed and abort, if this is not the case. Co-authored-by: Frédéric Simonis --- setup.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0ca92732..88e85e9b 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,17 @@ if sys.version_info[0] < 3: raise Exception("fenicsprecice only supports Python3. Did you run $python setup.py