Skip to content

Commit 69a16bd

Browse files
Merge pull request #136 from precice/fenics-adapter-v1.2.0
Release v1.2.0
2 parents beabcd1 + 8ff280d commit 69a16bd

File tree

14 files changed

+330
-131
lines changed

14 files changed

+330
-131
lines changed

.github/workflows/build-and-test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ on:
99
- '**'
1010

1111
jobs:
12+
sdist:
13+
name: Build distribution
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: '3.x'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine
26+
- name: Build distribution
27+
run: python3 setup.py sdist
1228
test:
1329
name: Run mock unit tests
1430
runs-on: ubuntu-latest

.github/workflows/build-docker.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update docker image
2+
3+
on:
4+
workflow_dispatch: # Trigger by hand from the UI
5+
push:
6+
branches:
7+
- develop
8+
9+
jobs:
10+
build-and-release-docker-image:
11+
name: Builds a dockerimage with the fenics adapter of preCICE
12+
runs-on: ubuntu-latest
13+
env:
14+
docker_username: precice
15+
steps:
16+
- name: Get branch name
17+
if: github.event_name != 'pull_request'
18+
shell: bash
19+
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
20+
- name: Checkout Repository
21+
uses: actions/checkout@v2
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v1
24+
- name: Login to DockerHub
25+
uses: docker/login-action@v1
26+
with:
27+
username: ${{ env.docker_username }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
- name: Build and push Dockerfile
30+
uses: docker/build-push-action@v2
31+
with:
32+
push: true
33+
file: "./tools/releasing/packaging/docker/Dockerfile"
34+
tags: ${{ env.docker_username }}/fenics-adapter:${{ env.branch }},${{ env.docker_username }}/fenics-adapter:latest
35+
build-args: |
36+
branch=${{ env.branch }}

.github/workflows/check-links.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint scripts and docs
2+
on: [push, pull_request]
3+
jobs:
4+
check_markdown_files:
5+
name: Lint scripts and docs
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Check out repository
9+
uses: actions/checkout@v2
10+
- name: Lint markdown files (markdownlint)
11+
uses: articulate/actions-markdownlint@v1
12+
with:
13+
config: .markdownlint.json
14+
files: '.'
15+
ignore: changelog-entries
16+
- name: Check links in markdown files (markdown-link-check)
17+
uses: gaurav-nelson/github-action-markdown-link-check@v1
18+
with:
19+
use-quiet-mode: 'yes'
20+
use-verbose-mode: 'no'
21+
config-file: '.markdown-link-check-config.json'

.markdown-link-check-config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"aliveStatusCodes": [429, 200]
3+
}

.markdownlint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"MD013": false,
3+
"MD033": false
4+
}

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
# FEniCS-preCICE adapter changelog
22

3+
## 1.2.0
4+
5+
* Reduce complexity of initialization to reduce runtime for large cases. [See PR #135](https://github.com/precice/fenics-adapter/pull/135)
6+
* Raise warning, if FEniCS is not found on system. [See PR #130](https://github.com/precice/fenics-adapter/pull/130)
7+
* Add test for python3 setup.py sdist. [See PR #127](https://github.com/precice/fenics-adapter/pull/127)
8+
39
## 1.1.0
410

511
* Only warn during initialization, if duplicate boundary point is found for point sources.
6-
* Remove deprecated package `fenicsadapter`. Don't use `import fenicsadapter`. Please use `import fenicsprecice`. https://github.com/precice/fenics-adapter/pull/121
12+
* Remove deprecated package `fenicsadapter`. Don't use `import fenicsadapter`. Please use `import fenicsprecice`. [See PR #121](https://github.com/precice/fenics-adapter/pull/121)
713

814
## 1.0.1
915

10-
* Bugfix for PointSources https://github.com/precice/fenics-adapter/issues/109
11-
* Bugfix in parallelization https://github.com/precice/fenics-adapter/pull/110
16+
* Bugfix for PointSources in [PR #109](https://github.com/precice/fenics-adapter/issues/109)
17+
* Bugfix in parallelization in [PR #110](https://github.com/precice/fenics-adapter/pull/110)
1218

1319
## 1.0.0
1420

1521
* The paper *FEniCS-preCICE: Coupling FEniCS to other Simulation Software* (in preparation) describes features, usage and API of the adapter.
16-
* The software is called FEniCS-preCICE adapter, the corresponding python package `fenicsprecice`. Our software uses the naming proposed in https://github.com/precice/fenics-adapter/issues/85.
17-
* `fenicsprecice` is published via PyPI https://github.com/precice/fenics-adapter/pull/94.
22+
* The software is called FEniCS-preCICE adapter, the corresponding python package `fenicsprecice`. Our software uses the naming proposed in [PR #85](https://github.com/precice/fenics-adapter/issues/85).
23+
* `fenicsprecice` is published via PyPI. [See PR #94](https://github.com/precice/fenics-adapter/pull/94).
1824
* FEniCS PointSource and Expressions are used to create boundary conditions for coupling.
19-
* The adapter uses a `SegregatedRBFinterpolationExpression` for interpolation, if an Expression is used https://github.com/precice/fenics-adapter/pull/83.
25+
* The adapter uses a `SegregatedRBFinterpolationExpression` for interpolation, if an Expression is used. [See PR #83](https://github.com/precice/fenics-adapter/pull/83).
2026
* The adapter supports one-way coupling and two-way coupling.
2127
* The adapter supports explicit and implicit coupling schemes.
2228
* The adapter supports checkpointing and subcycling.
2329
* The adapter supports up to one read and one write data set.
24-
* The current state of the adapter API was mainly designed in https://github.com/precice/fenics-adapter/pull/59.
25-
* Supports parallel solvers for Expressions, but not for PointSources as coupling boundary conditions. See https://github.com/precice/fenics-adapter/pull/71.
30+
* The current state of the adapter API was mainly designed in [PR #59](https://github.com/precice/fenics-adapter/pull/59).
31+
* Supports parallel solvers for Expressions, but not for PointSources as coupling boundary conditions. [See PR #71](https://github.com/precice/fenics-adapter/pull/71).

README.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FEniCS-preCICE adapter
2-
----------------------
1+
# FEniCS-preCICE adapter
32

43
<a style="text-decoration: none" href="https://github.com/precice/fenics-adapter/blob/master/LICENSE" target="_blank">
54
<img src="https://img.shields.io/github/license/precice/fenics-adapter.svg" alt="GNU LGPL license">
@@ -13,25 +12,25 @@ FEniCS-preCICE adapter
1312
</a>
1413
<a style="text-decoration: none" href="https://pypi.org/project/fenicsprecice/" target="_blank">
1514
<img src="https://github.com/precice/fenics-adapter/actions/workflows/pythonpublish.yml/badge.svg" alt="Upload Python Package">
16-
</a>
17-
18-
preCICE-adapter for the open source computing platform FEniCS
15+
</a>
1916

20-
**currently only supports 2D simulations in FEniCS**
17+
preCICE-adapter for the open source computing platform FEniCS. Note: The adapter **currently only supports 2D simulations in FEniCS.**
2118

22-
# Installing the package
19+
## Installing the package
2320

24-
## Using pip3 to install from PyPI
21+
### Using pip3 to install from PyPI
2522

2623
It is recommended to install [fenicsprecice from PyPI](https://pypi.org/project/fenicsprecice/) via
24+
25+
```bash
26+
pip3 install --user fenicsprecice
2727
```
28-
$ pip3 install --user fenicsprecice
29-
```
28+
3029
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
3130

32-
## Clone this repository and use pip3
31+
### Clone this repository and use pip3
3332

34-
### Required dependencies
33+
#### Required dependencies
3534

3635
Make sure to install the following dependencies:
3736

@@ -41,22 +40,23 @@ Make sure to install the following dependencies:
4140
* [FEniCS](https://fenicsproject.org/) (with python interface, installed by default)
4241
* and scipy (`pip3 install scipy`)
4342

44-
### Build and install the adapter
43+
#### Build and install the adapter
4544

4645
After cloning this repository and switching to the root directory (`fenics-adapter`), run ``pip3 install --user .`` from your shell.
4746

48-
### Test the adapter
47+
#### Test the adapter
4948

5049
As a first test, try to import the adapter via `python3 -c "import fenicsprecice"`.
5150

5251
You can run the other tests via `python3 setup.py test`.
5352

5453
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:
55-
```
54+
55+
```bash
5656
python3 -m unittest tests.test_write_read.TestWriteandReadData.test_vector_write
5757
```
5858

59-
### Troubleshooting
59+
#### Troubleshooting
6060

6161
**FEniCS is suddenly broken:** There are two known issues with preCICE, fenicsprecice and FEniCS:
6262

@@ -65,33 +65,28 @@ python3 -m unittest tests.test_write_read.TestWriteandReadData.test_vector_write
6565

6666
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).
6767

68-
# Use the adapter
68+
## Use the adapter
6969

7070
Please refer to [our website](https://www.precice.org/adapter-fenics.html#how-can-i-use-my-own-solver-with-the-adapter-).
7171

72-
# Packaging
72+
## Packaging
7373

74-
To create and install the `fenicsprecice` python package the following instructions were used: https://python-packaging.readthedocs.io/en/latest/index.html.
74+
To create and install the `fenicsprecice` python package the following instructions were used: [How To Package Your Python Code from python-packaging.readthedocs.io](https://python-packaging.readthedocs.io/en/latest/index.html).
7575

76-
# Citing
76+
## Citing
7777

7878
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).
7979

8080
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/):
8181

8282
*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.*
8383

84-
If you are using FEniCS, please also consider the information on https://fenicsproject.org/citing/.
85-
86-
# Disclaimer
84+
If you are using FEniCS, please also consider the information on [the official FEniCS website on citing](https://fenicsproject.org/citing/).
8785

88-
This offering is not approved or endorsed by the FEniCS Project, producer and distributor of the FEniCS software via https://fenicsproject.org/.
89-
90-
# Development history
86+
## Development history
9187

9288
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).
9389

9490
[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).
9591

9692
[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.
97-

docs/ReleaseGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Guide to release new version of the FEniCS-preCICE adapter
1+
# Guide to release new version of the FEniCS-preCICE adapter
22

33
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:
44

fenicsprecice/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
import warnings
2+
3+
try:
4+
from fenics import *
5+
except ModuleNotFoundError:
6+
warnings.warn("No FEniCS installation found on system. Please check whether it is found correctly. "
7+
"The FEniCS adapter might not work as expected.\n\n")
8+
19
from .fenicsprecice import Adapter
210
from ._version import get_versions
311
__version__ = get_versions()['version']

0 commit comments

Comments
 (0)