Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chapter1/complex_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions chapter1/fundamentals_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions chapter1/fundamentals_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter1/membrane_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter1/nitsche.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions chapter2/amr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion chapter2/amr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/diffusion_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/heat_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/helmholtz_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/hyperelasticity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/linearelasticity_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/nonlinpoisson_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/ns_code1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/ns_code2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter2/singular_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/component_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/em.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/multiple_dirichlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/neumann_dirichlet_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/robin_neumann_dirichlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter3/subdomains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter4/compiler_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter4/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions chapter4/mixed_poisson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions chapter4/mixed_poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion chapter4/newton-solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chapter4/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down