From 9ba00e4524bddf4784d78c932f925af0aec9d396 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Sun, 13 Oct 2024 16:56:59 +0200 Subject: [PATCH 1/9] Update tests.yml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b81f3d..0fe0ab9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: tests +9name: tests on: push: branches: @@ -14,7 +14,7 @@ on: jobs: build-and-test: runs-on: ubuntu-latest - container: ghcr.io/fenics/dolfinx/dolfinx:v0.8.0 + container: ghcr.io/fenics/dolfinx/dolfinx:v0.9.0 steps: - name: Checkout uses: actions/checkout@v3 From 3b0165eac28684d12af1b455cdde8b918986425e Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Sun, 13 Oct 2024 17:09:49 +0200 Subject: [PATCH 2/9] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fe0ab9..e622c6f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -9name: tests +name: tests on: push: branches: From 6fb7aa9081317e03f0fe2a59dc0fef802448098e Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:22:18 +0200 Subject: [PATCH 3/9] Update to version 0.10.dev0 --- .github/workflows/tests.yml | 10 +++++----- doc/source/conf.py | 5 ++--- launch-container.sh | 2 +- pyproject.toml | 16 ++++++++++++++-- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e622c6f..6a0f56d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,19 +14,19 @@ on: jobs: build-and-test: runs-on: ubuntu-latest - container: ghcr.io/fenics/dolfinx/dolfinx:v0.9.0 + container: ghcr.io/fenics/dolfinx/dolfinx:nightly steps: - name: Checkout uses: actions/checkout@v3 + - name: Install FEniCSx-Shells + run: | + python3 -m pip install --no-build-isolation --check-build-dependencies '.[ci]' + - name: ruff checks run: | ruff check . ruff format --check . - - - name: Install FEniCSx-Shells - run: | - python3 -m pip install --no-build-isolation --check-build-dependencies . - name: Build documentation run: | diff --git a/doc/source/conf.py b/doc/source/conf.py index ffe1a0f..4b084bc 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,9 +15,9 @@ jupytext_process.process() project = "FEniCSx-Shells" -copyright = "2022, FEniCSx-Shells Authors" +copyright = "2022-2024, FEniCSx-Shells Authors" author = "FEniCSx-Shells Authors" -release = "0.5.0.dev0" +release = "0.10.0.dev0" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -55,5 +55,4 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = "alabaster" html_static_path = ["_static"] diff --git a/launch-container.sh b/launch-container.sh index 300616f..f1329de 100755 --- a/launch-container.sh +++ b/launch-container.sh @@ -1,3 +1,3 @@ #!/bin/bash CONTAINER_ENGINE="docker" -${CONTAINER_ENGINE} run -ti -v $(pwd):/shared -w /shared dolfinx/dolfinx:v0.7.2 +${CONTAINER_ENGINE} run -ti -v $(pwd):/shared -w /shared dolfinx/dolfinx:v0.9.0 diff --git a/pyproject.toml b/pyproject.toml index 3110062..59f1f15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "fenicsx-shells" -version = "0.8.0.dev0" +version = "0.10.0.dev0" description = "FEniCSx-Shells" readme = "README.md" requires-python = ">=3.9.0" @@ -14,7 +14,19 @@ authors = [ { name = "Jack S. Hale" }, ] dependencies = [ - "fenics-dolfinx>=0.8.0.dev0,<0.9.0", + "fenics-dolfinx>=0.10.0.dev0,<0.11.0", +] + +[project.optional-dependencies] +doc = ["myst_parser", "sphinx_rtd_theme", "sphinx"] +demo = [] +test = ["pytest"] +lint = ["ruff"] +ci = [ + "dolfinx-external-operator[doc]", + "dolfinx-external-operator[demo]", + "dolfinx-external-operator[test]", + "dolfinx-external-operator[lint]", ] [tool.ruff] From a76b96e8ceb0a356c6924e9fcfa13e68c2c17f82 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:26:48 +0200 Subject: [PATCH 4/9] Fix. --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 59f1f15..21e734a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,10 @@ demo = [] test = ["pytest"] lint = ["ruff"] ci = [ - "dolfinx-external-operator[doc]", - "dolfinx-external-operator[demo]", - "dolfinx-external-operator[test]", - "dolfinx-external-operator[lint]", + "fenicsx-shells[doc]", + "fenicsx-shells[demo]", + "fenicsx-shells[test]", + "fenicsx-shells[lint]", ] [tool.ruff] From bd45b60da482ef1d994a12b3fb8afff4ed7480ee Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:28:43 +0200 Subject: [PATCH 5/9] Tweak. --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 21e734a..4d8e6fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,13 +5,13 @@ build-backend = "setuptools.build_meta" [project] name = "fenicsx-shells" version = "0.10.0.dev0" -description = "FEniCSx-Shells" +description = "A FEniCSx library for simulating thin structures" readme = "README.md" requires-python = ">=3.9.0" license = { file = "COPYING.LESSER" } authors = [ - { email = "jack.hale@uni.lu" }, - { name = "Jack S. Hale" }, + { name = "Jack S. Hale", email = "mail@jackhale.co.uk" } + { name = "Tian Yang" } ] dependencies = [ "fenics-dolfinx>=0.10.0.dev0,<0.11.0", From 2a734a71eeafdc106632473e11abb7fc19346098 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:30:32 +0200 Subject: [PATCH 6/9] Fix. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d8e6fb..7ae477e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ readme = "README.md" requires-python = ">=3.9.0" license = { file = "COPYING.LESSER" } authors = [ - { name = "Jack S. Hale", email = "mail@jackhale.co.uk" } + { name = "Jack S. Hale", email = "mail@jackhale.co.uk" }, { name = "Tian Yang" } ] dependencies = [ From 7d64f2c72d58b11cfa6af7562f913327b2e5255d Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:36:25 +0200 Subject: [PATCH 7/9] Fix. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7ae477e..3fab63c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ ] [project.optional-dependencies] -doc = ["myst_parser", "sphinx_rtd_theme", "sphinx"] +doc = ["jupytext", "myst_parser", "sphinx_rtd_theme", "sphinx"] demo = [] test = ["pytest"] lint = ["ruff"] From 7e141057b967ebd74337eaa0b6101eb39ea74f12 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:38:11 +0200 Subject: [PATCH 8/9] Add matplotlib --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3fab63c..e80ef9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dependencies = [ [project.optional-dependencies] doc = ["jupytext", "myst_parser", "sphinx_rtd_theme", "sphinx"] -demo = [] +demo = ["matplotlib"] test = ["pytest"] lint = ["ruff"] ci = [ From 5b30b4a39eb2b3359b0eca81b3872a4394347515 Mon Sep 17 00:00:00 2001 From: "Jack S. Hale" Date: Mon, 14 Oct 2024 10:55:54 +0200 Subject: [PATCH 9/9] Fix for 0.10.0 - shouldn't determine_point_ownership be wrapped? --- demo/demo_nonlinear-naghdi-clamped-semicylinder.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/demo/demo_nonlinear-naghdi-clamped-semicylinder.py b/demo/demo_nonlinear-naghdi-clamped-semicylinder.py index 574dc53..9ccc1e1 100644 --- a/demo/demo_nonlinear-naghdi-clamped-semicylinder.py +++ b/demo/demo_nonlinear-naghdi-clamped-semicylinder.py @@ -545,10 +545,12 @@ def compute_cell_contributions(V, points): at that point""" # Determine what process owns a point and what cells it lies within mesh = V.mesh - _, _, owning_points, cells = dolfinx.cpp.geometry.determine_point_ownership( + point_ownership_data = dolfinx.cpp.geometry.determine_point_ownership( mesh._cpp_object, points, 1e-6 ) - owning_points = np.asarray(owning_points).reshape(-1, 3) + + owning_points = np.asarray(point_ownership_data.dest_points).reshape(-1, 3) + cells = point_ownership_data.dest_cells # Pull owning points back to reference cell mesh_nodes = mesh.geometry.x @@ -618,7 +620,7 @@ def F(self, x: PETSc.Vec, b: PETSc.Vec) -> None: dofs, basis_value * self.PS, addv=PETSc.InsertMode.ADD_VALUES ) - apply_lifting(b, [self._a], bcs=[self.bcs], x0=[x], scale=-1.0) + apply_lifting(b, [self._a], bcs=[self.bcs], x0=[x], alpha=-1.0) b.ghostUpdate(addv=PETSc.InsertMode.ADD, mode=PETSc.ScatterMode.REVERSE) set_bc(b, self.bcs, x, -1.0)