diff --git a/chapter1/complex_mode.py b/chapter1/complex_mode.py index a68d8481..ba5f68f2 100644 --- a/chapter1/complex_mode.py +++ b/chapter1/complex_mode.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (DOLFINx complex) # language: python diff --git a/chapter1/fundamentals_code.ipynb b/chapter1/fundamentals_code.ipynb index 2e0fd9bc..a8e7a586 100644 --- a/chapter1/fundamentals_code.ipynb +++ b/chapter1/fundamentals_code.ipynb @@ -124,11 +124,11 @@ " Once the mesh has been created, we can create the finite element function space $V$.\n", "The finite element function space does not need to be the same as the one used to describe the mesh.\n", "DOLFINx supports a wide range of arbitrary order finite element function spaces, see:\n", - "[Supported elements in DOLFINx](https://defelement.org/lists/implementations/basix.ufl.html)\n", + "[Supported elements in DOLFINx](https://defelement.org/lists/implementations/basix_ufl.html)\n", "for an extensive list.\n", "To create a function space, we need to specify what mesh the space is defined on,\n", - "what element famil the space is based on, and the degree of the element.\n", - "These can for instance be defned through a tuple `(\"family\", degree)`, as shown below" + "what element family the space is based on, and the degree of the element.\n", + "These can for instance be defined through a tuple `(\"family\", degree)`, as shown below" ] }, { diff --git a/chapter1/fundamentals_code.py b/chapter1/fundamentals_code.py index 4c8d0c20..2e8b57aa 100644 --- a/chapter1/fundamentals_code.py +++ b/chapter1/fundamentals_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.19.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python @@ -114,11 +114,11 @@ # Once the mesh has been created, we can create the finite element function space $V$. # The finite element function space does not need to be the same as the one used to describe the mesh. # DOLFINx supports a wide range of arbitrary order finite element function spaces, see: -# [Supported elements in DOLFINx](https://defelement.org/lists/implementations/basix.ufl.html) +# [Supported elements in DOLFINx](https://defelement.org/lists/implementations/basix_ufl.html) # for an extensive list. # To create a function space, we need to specify what mesh the space is defined on, -# what element famil the space is based on, and the degree of the element. -# These can for instance be defned through a tuple `("family", degree)`, as shown below +# what element family the space is based on, and the degree of the element. +# These can for instance be defined through a tuple `("family", degree)`, as shown below # + from dolfinx import fem diff --git a/chapter1/membrane_code.py b/chapter1/membrane_code.py index 81363110..0d2584c5 100644 --- a/chapter1/membrane_code.py +++ b/chapter1/membrane_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter1/nitsche.py b/chapter1/nitsche.py index 5f74bb1f..7b3b69c6 100644 --- a/chapter1/nitsche.py +++ b/chapter1/nitsche.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/amr.ipynb b/chapter2/amr.ipynb index 2ec33082..31269ae2 100644 --- a/chapter2/amr.ipynb +++ b/chapter2/amr.ipynb @@ -191,6 +191,7 @@ }, "outputs": [], "source": [ + "plotter = pyvista.Plotter()\n", "curved_grid = pyvista.UnstructuredGrid(*dolfinx.plot.vtk_mesh(curved_mesh))\n", "curved_grid.cell_data[\"ct\"] = ct.values\n", "plotter.add_mesh(\n", diff --git a/chapter2/amr.py b/chapter2/amr.py index 2f2fd2eb..1453049e 100644 --- a/chapter2/amr.py +++ b/chapter2/amr.py @@ -7,7 +7,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # --- # # Adaptive mesh refinement with NetGen and DOLFINx diff --git a/chapter2/diffusion_code.py b/chapter2/diffusion_code.py index 61edc349..1593521a 100644 --- a/chapter2/diffusion_code.py +++ b/chapter2/diffusion_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/heat_code.py b/chapter2/heat_code.py index 4b29da37..1b5776b8 100644 --- a/chapter2/heat_code.py +++ b/chapter2/heat_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/helmholtz_code.py b/chapter2/helmholtz_code.py index 6f638509..2507c57d 100644 --- a/chapter2/helmholtz_code.py +++ b/chapter2/helmholtz_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (DOLFINx complex) # language: python diff --git a/chapter2/hyperelasticity.py b/chapter2/hyperelasticity.py index b3fb1069..17572923 100644 --- a/chapter2/hyperelasticity.py +++ b/chapter2/hyperelasticity.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/linearelasticity_code.py b/chapter2/linearelasticity_code.py index 2485bf22..f04b573c 100644 --- a/chapter2/linearelasticity_code.py +++ b/chapter2/linearelasticity_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/nonlinpoisson_code.py b/chapter2/nonlinpoisson_code.py index 52a3bde3..db636b93 100644 --- a/chapter2/nonlinpoisson_code.py +++ b/chapter2/nonlinpoisson_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/ns_code1.py b/chapter2/ns_code1.py index 802e1ae9..7ca88041 100644 --- a/chapter2/ns_code1.py +++ b/chapter2/ns_code1.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/ns_code2.py b/chapter2/ns_code2.py index 94a2da59..1d0e9bc8 100644 --- a/chapter2/ns_code2.py +++ b/chapter2/ns_code2.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter2/singular_poisson.py b/chapter2/singular_poisson.py index 78f0945e..0c6dfe6f 100644 --- a/chapter2/singular_poisson.py +++ b/chapter2/singular_poisson.py @@ -7,7 +7,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # --- # # Singular Poisson problem diff --git a/chapter3/component_bc.py b/chapter3/component_bc.py index d82365d0..0d2d0847 100644 --- a/chapter3/component_bc.py +++ b/chapter3/component_bc.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter3/em.py b/chapter3/em.py index 6efe178a..0fdf59f2 100644 --- a/chapter3/em.py +++ b/chapter3/em.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter3/multiple_dirichlet.py b/chapter3/multiple_dirichlet.py index cf020c1e..9edf23d8 100644 --- a/chapter3/multiple_dirichlet.py +++ b/chapter3/multiple_dirichlet.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter3/neumann_dirichlet_code.py b/chapter3/neumann_dirichlet_code.py index 6a481d15..397d0202 100644 --- a/chapter3/neumann_dirichlet_code.py +++ b/chapter3/neumann_dirichlet_code.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter3/robin_neumann_dirichlet.py b/chapter3/robin_neumann_dirichlet.py index 4e5b54ff..a068e7c6 100644 --- a/chapter3/robin_neumann_dirichlet.py +++ b/chapter3/robin_neumann_dirichlet.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter3/subdomains.py b/chapter3/subdomains.py index 3f368778..2815ec04 100644 --- a/chapter3/subdomains.py +++ b/chapter3/subdomains.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter4/compiler_parameters.py b/chapter4/compiler_parameters.py index 97e5c33c..a1a3a8f3 100644 --- a/chapter4/compiler_parameters.py +++ b/chapter4/compiler_parameters.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter4/convergence.py b/chapter4/convergence.py index 7171451c..ee8043d3 100644 --- a/chapter4/convergence.py +++ b/chapter4/convergence.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter4/mixed_poisson.ipynb b/chapter4/mixed_poisson.ipynb index 11e15f8a..2678f396 100644 --- a/chapter4/mixed_poisson.ipynb +++ b/chapter4/mixed_poisson.ipynb @@ -336,7 +336,7 @@ " interpolation_points = Q_el.basix_element.x\n", " for i, points in enumerate(interpolation_points[fdim]):\n", " geom = ref_geom[ref_top[fdim][i]]\n", - " ref_points = facet_cel.pull_back(points, geom)\n", + " ref_points = facet_cel.pull_back(points, geom, tol=1e-6, maxit=25)\n", " # Assert that interpolation points are all equal on all facets\n", " if reference_facet_points is None:\n", " reference_facet_points = ref_points\n", @@ -378,7 +378,7 @@ " # Use lower-level interpolation that takes in the function evaluated at the physical\n", " # interpolation points of the mesh.\n", " qh = dolfinx.fem.Function(Q)\n", - " qh._cpp_object.interpolate(\n", + " qh._cpp_object.interpolate_f(\n", " values.reshape(-1, domain.geometry.dim).T.copy(), boundary_entities[::2].copy()\n", " )\n", " qh.x.scatter_forward()\n", diff --git a/chapter4/mixed_poisson.py b/chapter4/mixed_poisson.py index 30d93c03..828a4c60 100644 --- a/chapter4/mixed_poisson.py +++ b/chapter4/mixed_poisson.py @@ -7,7 +7,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # --- # # Mixed Poisson with a Schur complement pre-conditioner @@ -223,7 +223,7 @@ def interpolate_facet_expression( interpolation_points = Q_el.basix_element.x for i, points in enumerate(interpolation_points[fdim]): geom = ref_geom[ref_top[fdim][i]] - ref_points = facet_cel.pull_back(points, geom) + ref_points = facet_cel.pull_back(points, geom, tol=1e-6, maxit=25) # Assert that interpolation points are all equal on all facets if reference_facet_points is None: reference_facet_points = ref_points @@ -265,7 +265,7 @@ def interpolate_facet_expression( # Use lower-level interpolation that takes in the function evaluated at the physical # interpolation points of the mesh. qh = dolfinx.fem.Function(Q) - qh._cpp_object.interpolate( + qh._cpp_object.interpolate_f( values.reshape(-1, domain.geometry.dim).T.copy(), boundary_entities[::2].copy() ) qh.x.scatter_forward() diff --git a/chapter4/newton-solver.py b/chapter4/newton-solver.py index 80b460af..97c9e184 100644 --- a/chapter4/newton-solver.py +++ b/chapter4/newton-solver.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.19.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/chapter4/solvers.py b/chapter4/solvers.py index fc3999f9..d541f4f9 100644 --- a/chapter4/solvers.py +++ b/chapter4/solvers.py @@ -6,7 +6,7 @@ # extension: .py # format_name: light # format_version: '1.5' -# jupytext_version: 1.18.1 +# jupytext_version: 1.19.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python diff --git a/pyproject.toml b/pyproject.toml index ee1104ec..79075ad2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "DOLFINx_Tutorial" -version = "0.10.0" +version = "0.11.0" dependencies = [ "jupyter-book<2.0", "meshio", @@ -13,7 +13,7 @@ dependencies = [ "pandas", "tqdm", "pyvista[all]>=0.45.0", - "fenics-dolfinx>=0.10.0,<0.11.0", + "fenics-dolfinx>=0.11.0,<0.12.0", "sphinx-codeautolink", "trame_jupyter_extension", "jupytext",