Skip to content

Commit 00055fd

Browse files
jorgensdjuliusgh
andauthored
v0.8.0 (#166)
* Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve #136 * Fixes related to: FEniCS/dolfinx#2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: FEniCS/dolfinx#2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com>
1 parent 96fa05d commit 00055fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+690
-4014
lines changed

.github/workflows/book_stable.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on:
44
workflow_dispatch:
55
workflow_call:
66
pull_request:
7-
branches: ["main"]
8-
7+
branches: ["release"]
8+
push:
9+
branches: ["release"]
910
env:
1011
HDF5_MPI: "ON"
1112
HDF5_DIR: "/usr/local/"
@@ -15,7 +16,7 @@ env:
1516
jobs:
1617
build-book:
1718
runs-on: ubuntu-latest
18-
container: ghcr.io/fenics/dolfinx/lab:v0.7.3
19+
container: ghcr.io/fenics/dolfinx/lab:v0.8.0
1920

2021
env:
2122
PYVISTA_TRAME_SERVER_PROXY_PREFIX: "/proxy/"

.github/workflows/deploy.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish book
33
on:
44
push:
55
branches:
6-
- "main"
6+
- "release"
77
workflow_dispatch:
88

99
# Weekly build on Mondays at 8 am
@@ -19,12 +19,6 @@ concurrency:
1919
group: "pages"
2020
cancel-in-progress: true
2121

22-
env:
23-
HDF5_MPI: "ON"
24-
HDF5_DIR: "/usr/local/"
25-
DISPLAY: ":99.0"
26-
DEB_PYTHON_INSTALL_LAYOUT: deb_system
27-
2822
jobs:
2923
run-tests:
3024
uses: ./.github/workflows/test_stable.yml

.github/workflows/publish_docker.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
name: Publish tutorial docker image
12
on:
23
push:
34
branches:
4-
- "!*"
5+
- "release"
56
tags:
67
- "v*"
7-
8+
pull_request:
9+
branches:
10+
- "release"
811
workflow_dispatch:
912

1013
env:
@@ -41,8 +44,22 @@ jobs:
4144
with:
4245
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4346

44-
- name: Build and push Docker image
47+
- name: Build Docker image
48+
uses: docker/build-push-action@v5
49+
with:
50+
context: .
51+
load: true
52+
push: false
53+
file: docker/Dockerfile
54+
platforms: linux/amd64
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
58+
59+
60+
- name: Build (arm) and push (amd/arm) Docker image
4561
uses: docker/build-push-action@v5
62+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4663
with:
4764
context: .
4865
push: true

.github/workflows/test_nightly.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ name: Test release branch against DOLFINx nightly build
44
on:
55
pull_request:
66
branches:
7-
- release
7+
- main
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
11-
11+
workflow_call:
1212
schedule:
1313
- cron: "0 9 * * *"
1414

@@ -23,68 +23,67 @@ jobs:
2323
HDF5_MPI: "ON"
2424
PYVISTA_OFF_SCREEN: true
2525
DISPLAY: ":99.0"
26-
PYVISTA_JUPYTER_BACKEND: panel
26+
PYVISTA_JUPYTER_BACKEND: html
2727

28-
# Steps represent a sequence of tasks that will be executed as part of the job
2928
steps:
30-
# Checkout release branch to work on schedule
31-
- name: Checkout release branch
32-
uses: actions/checkout@v4
33-
if: ${{ github.event_name == 'schedule' }}
34-
with:
35-
ref: release
36-
37-
- name: Use current branch
38-
uses: actions/checkout@v4
39-
if: ${{ github.event_name != 'schedule' }}
29+
- uses: actions/checkout@v4
4030

4131
- name: Special handling of some installation
4232
uses: ./.github/actions/install-dependencies
4333

4434
- name: Install requirements
4535
run: python3 -m pip install --no-cache-dir --no-binary=h5py . --upgrade
4636

37+
- name: Test building the book
38+
run: PYVISTA_OFF_SCREEN=false jupyter-book build -W .
39+
4740
- name: Test complex notebooks in parallel
41+
working-directory: chapter1
4842
run: |
4943
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
5044
export PETSC_ARCH=linux-gnu-complex128-32
5145
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH
5246
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
53-
cd chapter1
5447
python3 complex_mode.py
5548
mpirun -n 2 python3 complex_mode.py
5649
57-
- name: Test real notebooks in parallel
50+
- name: Test chapter 1
51+
working-directory: chapter1
5852
run: |
59-
cd chapter1
60-
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
61-
mpirun -n 2 python3 fundamentals_code.py
62-
mpirun -n 2 python3 nitsche.py
63-
mpirun -n 2 python3 membrane_code.py
64-
cd ../chapter2
53+
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
54+
mpirun -n 2 python3 fundamentals_code.py
55+
mpirun -n 2 python3 nitsche.py
56+
mpirun -n 2 python3 membrane_code.py
57+
58+
- name: Test chapter 2
59+
working-directory: chapter2
60+
run: |
6561
mpirun -n 2 python3 diffusion_code.py
6662
mpirun -n 2 python3 heat_code.py
6763
mpirun -n 2 python3 linearelasticity_code.py
6864
mpirun -n 2 python3 hyperelasticity.py
6965
mpirun -n 2 python3 nonlinpoisson_code.py
7066
mpirun -n 2 python3 ns_code1.py
7167
mpirun -n 2 python3 ns_code2.py
72-
cd ../chapter3
68+
69+
- name: Test chapter 3
70+
working-directory: chapter3
71+
run: |
7372
mpirun -n 2 python3 neumann_dirichlet_code.py
7473
mpirun -n 2 python3 multiple_dirichlet.py
7574
mpirun -n 2 python3 subdomains.py
7675
mpirun -n 2 python3 robin_neumann_dirichlet.py
7776
mpirun -n 2 python3 component_bc.py
7877
mpirun -n 2 python3 em.py
79-
cd ../chapter4
78+
79+
- name: Test chapter 4
80+
working-directory: chapter4
81+
run: |
8082
mpirun -n 2 python3 solvers.py
8183
mpirun -n 2 python3 convergence.py
8284
mpirun -n 2 python3 compiler_parameters.py
8385
mpirun -n 2 python3 newton-solver.py
8486
85-
- name: Test building the book
86-
run: PYVISTA_OFF_SCREEN=false jupyter-book build -W .
87-
8887
- uses: actions/upload-artifact@v4
8988
if: always()
9089
with:

.github/workflows/test_stable.yml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
name: Check that all python files run in parallel
1+
name: Test stable release
22

3-
# Controls when the action will run.
43
on:
5-
# Allows you to run this workflow manually from the Actions tab
64
workflow_dispatch:
75
workflow_call:
86
pull_request:
9-
branches: ["main"]
7+
branches: ["release"]
108
env:
11-
# Directory that will be published on github pages
129
HDF5_MPI: "ON"
1310
HDF5_DIR: "/usr/local/"
1411
DISPLAY: ":99.0"
1512
DEB_PYTHON_INSTALL_LAYOUT: deb_system
1613

17-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1814
jobs:
19-
# This workflow contains a single job called "build"
2015
test:
21-
# The type of runner that the job will run on
2216
runs-on: ubuntu-latest
23-
container: ghcr.io/fenics/dolfinx/lab:v0.7.2
17+
container: ghcr.io/fenics/dolfinx/lab:v0.8.0
2418
env:
2519
PYVISTA_OFF_SCREEN: true
2620

@@ -35,41 +29,51 @@ jobs:
3529
python3 -m pip install --no-binary=h5py .
3630
3731
- name: Test complex notebooks in parallel
32+
working-directory: chapter1
3833
run: |
3934
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
4035
export PETSC_ARCH=linux-gnu-complex128-32
4136
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH
4237
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
43-
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
44-
cd chapter1
4538
python3 complex_mode.py
4639
mpirun -n 2 python3 complex_mode.py
47-
48-
- name: Test notebooks in parallel
40+
41+
- name: Test chapter 1
42+
working-directory: chapter1
4943
run: |
50-
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
51-
cd chapter1
52-
mpirun -n 2 python3 fundamentals_code.py
53-
mpirun -n 2 python3 membrane_code.py
54-
cd ../chapter2
44+
python3 -c "from pyvista import start_xvfb; start_xvfb(0.1)"
45+
mpirun -n 2 python3 fundamentals_code.py
46+
mpirun -n 2 python3 nitsche.py
47+
mpirun -n 2 python3 membrane_code.py
48+
49+
- name: Test chapter 2
50+
working-directory: chapter2
51+
run: |
5552
mpirun -n 2 python3 diffusion_code.py
5653
mpirun -n 2 python3 heat_code.py
5754
mpirun -n 2 python3 linearelasticity_code.py
5855
mpirun -n 2 python3 hyperelasticity.py
5956
mpirun -n 2 python3 nonlinpoisson_code.py
6057
mpirun -n 2 python3 ns_code1.py
6158
mpirun -n 2 python3 ns_code2.py
62-
cd ../chapter3
59+
60+
- name: Test chapter 3
61+
working-directory: chapter3
62+
run: |
6363
mpirun -n 2 python3 neumann_dirichlet_code.py
6464
mpirun -n 2 python3 multiple_dirichlet.py
6565
mpirun -n 2 python3 subdomains.py
6666
mpirun -n 2 python3 robin_neumann_dirichlet.py
6767
mpirun -n 2 python3 component_bc.py
6868
mpirun -n 2 python3 em.py
69-
cd ../chapter4
69+
70+
- name: Test chapter 4
71+
working-directory: chapter4
72+
run: |
7073
mpirun -n 2 python3 solvers.py
7174
mpirun -n 2 python3 convergence.py
7275
mpirun -n 2 python3 compiler_parameters.py
76+
mpirun -n 2 python3 newton-solver.py
7377
7478
- name: Upload Navier-Stokes DFG 2D 3 plots
7579
uses: actions/upload-artifact@v4

Changelog.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Changelog
22

3+
## v0.8.0
4+
5+
- Replace all `ufl.FiniteElement` and `ufl.VectorElement` with the appropriate `basix.ufl.element`
6+
- Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace`
7+
38
## v0.7.2
4-
- Change pyvista backend to `html`, using Pyvista main branch
5-
- Using DOLFINx v0.7.2 https://github.com/FEniCS/dolfinx/releases/tag/v0.7.2 as base
9+
10+
- Change pyvista backend to `html`, using Pyvista main branch
11+
- Using DOLFINx v0.7.2 https://github.com/FEniCS/dolfinx/releases/tag/v0.7.2 as base
612

713
## v0.7.1
8-
- No API changes, release due to various bug-fixes from the 0.7.0 release, see:
9-
https://github.com/FEniCS/dolfinx/releases/tag/v0.7.1 for more information
14+
15+
- No API changes, release due to various bug-fixes from the 0.7.0 release, see:
16+
https://github.com/FEniCS/dolfinx/releases/tag/v0.7.1 for more information
1017

1118
## v0.7.0
1219

@@ -46,7 +53,7 @@
4653
- API updates wrt. DOLFINx. `Form`->`form`, `DirichletBC`->`dirichletbc`.
4754
- Updates on error computations in [Error control: Computing convergence rates](chapter4/convergence).
4855
- Added tutorial on interpolation of `ufl.Expression` in [Deflection of a membrane](chapter1/membrane_code).
49-
- Added tutorial on how to apply constant-valued Dirichet conditions in [Deflection of a membrane](chapter1/membrane_code).
56+
- Added tutorial on how to apply constant-valued Dirichlet conditions in [Deflection of a membrane](chapter1/membrane_code).
5057
- Various API changes relating to the import structure of DOLFINx
5158

5259
## 0.3.0 (09.09.2021)

chapter1/complex_mode.ipynb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"\n",
1212
"Many PDEs, such as the [Helmholtz equation](https://docs.fenicsproject.org/dolfinx/v0.4.1/python/demos/demo_helmholtz.html) require complex-valued fields.\n",
1313
"\n",
14-
"For simplicity, let us consider a Poisson equation of the form:\n",
14+
"For simplicity, let us consider a Poisson equation of the form: \n",
1515
"\n",
1616
"$$-\\Delta u = f \\text{ in } \\Omega,$$\n",
1717
"$$ f = -1 - 2j \\text{ in } \\Omega,$$\n",
@@ -57,7 +57,7 @@
5757
"import dolfinx\n",
5858
"import numpy as np\n",
5959
"mesh = dolfinx.mesh.create_unit_square(MPI.COMM_WORLD, 10, 10)\n",
60-
"V = dolfinx.fem.FunctionSpace(mesh, (\"Lagrange\", 1))\n",
60+
"V = dolfinx.fem.functionspace(mesh, (\"Lagrange\", 1))\n",
6161
"u_r = dolfinx.fem.Function(V, dtype=np.float64) \n",
6262
"u_r.interpolate(lambda x: x[0])\n",
6363
"u_c = dolfinx.fem.Function(V, dtype=np.complex128)\n",
@@ -75,7 +75,7 @@
7575
"\n",
7676
"Unfortunately, PETSc only supports one floating type in their matrices, thus we need to install two versions of PETSc, one that supports `float64` and one that supports `complex128`. In the [docker images](https://hub.docker.com/r/dolfinx/dolfinx) for DOLFINx, both versions are installed, and one can switch between them by calling `source dolfinx-real-mode` or `source dolfinx-complex-mode`. For the `dolfinx/lab` images, one can change the Python kernel to be either the real or complex mode, by going to `Kernel->Change Kernel...` and choosing `Python3 (ipykernel)` (for real mode) or `Python3 (DOLFINx complex)` (for complex mode).\n",
7777
"\n",
78-
"We check that we are using the correct installation of PETSc by inspecting the scalar type.\n"
78+
"We check that we are using the correct installation of PETSc by inspecting the scalar type."
7979
]
8080
},
8181
{
@@ -105,8 +105,7 @@
105105
"metadata": {},
106106
"source": [
107107
"## Variational problem\n",
108-
"\n",
109-
"We are now ready to define our variational problem\n"
108+
"We are now ready to define our variational problem"
110109
]
111110
},
112111
{
@@ -133,7 +132,7 @@
133132
"\n",
134133
"Secondly, note that we are using `ufl.inner` to describe multiplication of $f$ and $v$, even if they are scalar values. This is because `ufl.inner` takes the conjugate of the second argument, as decribed by the $L^2$ inner product. One could alternatively write this out explicitly\n",
135134
"\n",
136-
"### Inner-products and derivatives\n"
135+
"### Inner-products and derivatives"
137136
]
138137
},
139138
{
@@ -252,8 +251,7 @@
252251
"metadata": {},
253252
"source": [
254253
"We define our Dirichlet condition and setup and solve the variational problem.\n",
255-
"\n",
256-
"## Solve variational problem\n"
254+
"## Solve variational problem"
257255
]
258256
},
259257
{

0 commit comments

Comments
 (0)