diff --git a/.github/workflows/book_stable.yml b/.github/workflows/book_stable.yml index 631a88b1..170755d2 100644 --- a/.github/workflows/book_stable.yml +++ b/.github/workflows/book_stable.yml @@ -16,7 +16,7 @@ env: jobs: build-book: runs-on: ubuntu-latest - container: ghcr.io/fenics/dolfinx/lab:v0.8.0 + container: ghcr.io/fenics/dolfinx/lab:stable env: PYVISTA_TRAME_SERVER_PROXY_PREFIX: "/proxy/" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cce3e7da..3e467708 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Download docs artifact uses: actions/download-artifact@v4 diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 77ffc5f3..753bf033 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -45,7 +45,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . load: true @@ -56,7 +56,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Build (arm) and push (amd/arm) Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 if: github.event_name == 'push' with: context: . diff --git a/.github/workflows/test_nightly.yml b/.github/workflows/test_nightly.yml index e4f4736e..ed0f52c5 100644 --- a/.github/workflows/test_nightly.yml +++ b/.github/workflows/test_nightly.yml @@ -39,6 +39,9 @@ jobs: - name: Test building the book run: PYVISTA_OFF_SCREEN=false jupyter-book build -W . + - name: Test building the book + run: PYVISTA_OFF_SCREEN=false jupyter-book build -W . + - name: Test complex notebooks in parallel working-directory: chapter1 run: | @@ -67,7 +70,6 @@ jobs: mpirun -n 2 python3 nonlinpoisson_code.py mpirun -n 2 python3 ns_code1.py mpirun -n 2 python3 ns_code2.py - - name: Test chapter 3 working-directory: chapter3 run: | @@ -77,7 +79,6 @@ jobs: mpirun -n 2 python3 robin_neumann_dirichlet.py mpirun -n 2 python3 component_bc.py mpirun -n 2 python3 em.py - - name: Test chapter 4 working-directory: chapter4 run: | diff --git a/.github/workflows/test_stable.yml b/.github/workflows/test_stable.yml index ae7dd271..cb84bc96 100644 --- a/.github/workflows/test_stable.yml +++ b/.github/workflows/test_stable.yml @@ -14,7 +14,7 @@ env: jobs: test: runs-on: ubuntu-latest - container: ghcr.io/fenics/dolfinx/lab:v0.8.0 + container: ghcr.io/fenics/dolfinx/lab:stable env: PYVISTA_OFF_SCREEN: true @@ -33,7 +33,7 @@ jobs: run: | export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH export PETSC_ARCH=linux-gnu-complex128-32 - export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.10/dist-packages:$PYTHONPATH + export PYTHONPATH=/usr/local/dolfinx-complex/lib/python3.12/dist-packages:$PYTHONPATH export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH python3 complex_mode.py mpirun -n 2 python3 complex_mode.py diff --git a/Changelog.md b/Changelog.md index 2817a0bb..7c79cc03 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Changelog +## v0.9.0 + +- `scale` in `apply_lifting` has been renamed to `alpha` +- Use `dolfinx.fem.Function.x.petsc_vec` as opposed to `dolfinx.fem.Function.vector` + ## v0.8.0 - Replace all `ufl.FiniteElement` and `ufl.VectorElement` with the appropriate `basix.ufl.element` diff --git a/chapter2/linearelasticity_code.ipynb b/chapter2/linearelasticity_code.ipynb index 99e27b3f..1c7efd08 100644 --- a/chapter2/linearelasticity_code.ipynb +++ b/chapter2/linearelasticity_code.ipynb @@ -10,11 +10,11 @@ "In this tutorial, you will learn how to:\n", "- Use a vector function space\n", "- Create a constant boundary condition on a vector space\n", - "- Visualize cell wise constant functions\n", + "- Visualize cell-wise constant functions\n", "- Compute Von Mises stresses\n", "\n", "## Test problem\n", - "As a test example, we will model a clamped beam deformed under its own weigth in 3D. This can be modeled, by setting the right-hand side body force per unit volume to $f=(0,0,-\\rho g)$ with $\\rho$ the density of the beam and $g$ the acceleration of gravity. The beam is box-shaped with length $L$ and has a square cross section of width $W$. We set $u=u_D=(0,0,0)$ at the clamped end, x=0. The rest of the boundary is traction free, that is, we set $T=0$. We start by defining the physical variables used in the program." + "As a test example, we will model a clamped beam deformed under its own weight in 3D. This can be modeled, by setting the right-hand side body force per unit volume to $f=(0,0,-\\rho g)$ with $\\rho$ the density of the beam and $g$ the acceleration of gravity. The beam is box-shaped with length $L$ and has a square cross section of width $W$. We set $u=u_D=(0,0,0)$ at the clamped end, x=0. The rest of the boundary is traction free, that is, we set $T=0$. We start by defining the physical variables used in the program." ] }, { diff --git a/chapter2/ns_code2.ipynb b/chapter2/ns_code2.ipynb index d894cf5e..237dca40 100644 --- a/chapter2/ns_code2.ipynb +++ b/chapter2/ns_code2.ipynb @@ -651,6 +651,7 @@ " if pressure is not None:\n", " p_diff[i] -= pressure[0]\n", " break\n", + "progress.close()\n", "vtx_u.close()\n", "vtx_p.close()" ] diff --git a/chapter2/ns_code2.py b/chapter2/ns_code2.py index 12062c89..1c0be052 100644 --- a/chapter2/ns_code2.py +++ b/chapter2/ns_code2.py @@ -478,6 +478,7 @@ def __call__(self, x): if pressure is not None: p_diff[i] -= pressure[0] break +progress.close() vtx_u.close() vtx_p.close() diff --git a/chapter4/compiler_parameters.ipynb b/chapter4/compiler_parameters.ipynb index 77e42ab6..c067f1f7 100644 --- a/chapter4/compiler_parameters.ipynb +++ b/chapter4/compiler_parameters.ipynb @@ -50,7 +50,7 @@ "id": "2", "metadata": {}, "source": [ - "Next we generate a general function to assemble the mass matrix for a unit cube. Note that we use `dolfinx.fem.Form` to compile the variational form. For codes using `dolfinx.LinearProblem`, you can supply `jit_options` as a keyword argument." + "Next we generate a general function to assemble the mass matrix for a unit cube. Note that we use `dolfinx.fem.form` to compile the variational form. For codes using `dolfinx.fem.petsc.LinearProblem`, you can supply `jit_options` as a keyword argument." ] }, { diff --git a/chapter4/compiler_parameters.py b/chapter4/compiler_parameters.py index e5811c4d..25366121 100644 --- a/chapter4/compiler_parameters.py +++ b/chapter4/compiler_parameters.py @@ -46,7 +46,7 @@ print(f"Directory to put C files in: {cache_dir}") # - -# Next we generate a general function to assemble the mass matrix for a unit cube. Note that we use `dolfinx.fem.Form` to compile the variational form. For codes using `dolfinx.LinearProblem`, you can supply `jit_options` as a keyword argument. +# Next we generate a general function to assemble the mass matrix for a unit cube. Note that we use `dolfinx.fem.form` to compile the variational form. For codes using `dolfinx.fem.petsc.LinearProblem`, you can supply `jit_options` as a keyword argument. # + diff --git a/fem.md b/fem.md index f2f86710..14ad6afd 100644 --- a/fem.md +++ b/fem.md @@ -40,13 +40,13 @@ The tutorial uses several dependencies for meshing, plotting and timings. A comp To use the notebooks in this tutorial with DOLFINx on your own computer, you should use the docker image obtained using the following command: ```bash - docker run --init -p 8888:8888 -v "$(pwd)":/root/shared ghcr.io/jorgensd/dolfinx-tutorial:v0.7.2 + docker run --init -p 8888:8888 -v "$(pwd)":/root/shared ghcr.io/jorgensd/dolfinx-tutorial:release ``` This image can also be used as a normal docker container by adding: ```bash - docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:v0.7.2 + docker run --ti -v "$(pwd)":/root/shared --entrypoint="/bin/bash" ghcr.io/jorgensd/dolfinx-tutorial:release ``` The tutorials can also be exported as an IPython notebook or PDF by clicking the ![Download](save.png)-symbol in the top right corner of the relevant tutorial. The notebook can in turn be used with a Python kernel which has DOLFINx. @@ -58,7 +58,7 @@ The [Dockerfile](https://github.com/FEniCS/dolfinx/blob/main/docker/Dockerfile) provides a definitive build recipe. As the DOLFINx docker images are hosted at Docker-hub, one can directly access the image using: ```bash -docker run dolfinx/dolfinx:v0.8.0 +docker run dolfinx/dolfinx:stable ``` There are several ways of customizing a docker container, such as mounting volumes/sharing folder, setting a working directory, sharing graphical interfaces etc. See `docker run --help` for an extensive list.