diff --git a/tutorials/02_navier_stokes/tutorial_navier_stokes.ipynb b/tutorials/02_navier_stokes/tutorial_navier_stokes.ipynb index 8a408dd..fed16a1 100644 --- a/tutorials/02_navier_stokes/tutorial_navier_stokes.ipynb +++ b/tutorials/02_navier_stokes/tutorial_navier_stokes.ipynb @@ -168,9 +168,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_interface.ipynb b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_interface.ipynb index c9f5ee2..f7560d8 100644 --- a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_interface.ipynb +++ b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_interface.ipynb @@ -155,9 +155,11 @@ "outputs": [], "source": [ "partitioner = dolfinx.mesh.create_cell_partitioner(dolfinx.mesh.GhostMode.shared_facet)\n", - "mesh, subdomains, boundaries_and_interfaces = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries_and_interfaces, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2, partitioner=partitioner)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries_and_interfaces is not None" ] }, { diff --git a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_linear.ipynb b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_linear.ipynb index 8fa36fb..5c68883 100644 --- a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_linear.ipynb +++ b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_linear.ipynb @@ -149,9 +149,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_nonlinear.ipynb b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_nonlinear.ipynb index 0bf6bb1..62699a9 100644 --- a/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_nonlinear.ipynb +++ b/tutorials/03_lagrange_multipliers/tutorial_lagrange_multipliers_nonlinear.ipynb @@ -166,9 +166,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/04_eigenvalue_problems/tutorial_eigenvalue_laplacian.ipynb b/tutorials/04_eigenvalue_problems/tutorial_eigenvalue_laplacian.ipynb index d2456be..2866ad9 100644 --- a/tutorials/04_eigenvalue_problems/tutorial_eigenvalue_laplacian.ipynb +++ b/tutorials/04_eigenvalue_problems/tutorial_eigenvalue_laplacian.ipynb @@ -140,9 +140,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/04_eigenvalue_problems/tutorial_infsup_lagrange_multipliers.ipynb b/tutorials/04_eigenvalue_problems/tutorial_infsup_lagrange_multipliers.ipynb index e5a19aa..0ad44f3 100644 --- a/tutorials/04_eigenvalue_problems/tutorial_infsup_lagrange_multipliers.ipynb +++ b/tutorials/04_eigenvalue_problems/tutorial_infsup_lagrange_multipliers.ipynb @@ -133,9 +133,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/06_optimal_control/tutorial_1b_poisson.ipynb b/tutorials/06_optimal_control/tutorial_1b_poisson.ipynb index d2f9ef3..7c6dcc1 100644 --- a/tutorials/06_optimal_control/tutorial_1b_poisson.ipynb +++ b/tutorials/06_optimal_control/tutorial_1b_poisson.ipynb @@ -150,9 +150,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/06_optimal_control/tutorial_2b_advection_diffusion_reaction.ipynb b/tutorials/06_optimal_control/tutorial_2b_advection_diffusion_reaction.ipynb index dfc9ef7..5975471 100644 --- a/tutorials/06_optimal_control/tutorial_2b_advection_diffusion_reaction.ipynb +++ b/tutorials/06_optimal_control/tutorial_2b_advection_diffusion_reaction.ipynb @@ -218,9 +218,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/06_optimal_control/tutorial_3b_advection_diffusion_reaction_neumann_control.ipynb b/tutorials/06_optimal_control/tutorial_3b_advection_diffusion_reaction_neumann_control.ipynb index 416f9ee..c26a729 100644 --- a/tutorials/06_optimal_control/tutorial_3b_advection_diffusion_reaction_neumann_control.ipynb +++ b/tutorials/06_optimal_control/tutorial_3b_advection_diffusion_reaction_neumann_control.ipynb @@ -213,9 +213,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/06_optimal_control/tutorial_7a_stokes_dirichlet_control.ipynb b/tutorials/06_optimal_control/tutorial_7a_stokes_dirichlet_control.ipynb index d527e34..e44fc0f 100644 --- a/tutorials/06_optimal_control/tutorial_7a_stokes_dirichlet_control.ipynb +++ b/tutorials/06_optimal_control/tutorial_7a_stokes_dirichlet_control.ipynb @@ -210,9 +210,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/06_optimal_control/tutorial_7b_stokes_neumann_control.ipynb b/tutorials/06_optimal_control/tutorial_7b_stokes_neumann_control.ipynb index 9a37c89..4ee693d 100644 --- a/tutorials/06_optimal_control/tutorial_7b_stokes_neumann_control.ipynb +++ b/tutorials/06_optimal_control/tutorial_7b_stokes_neumann_control.ipynb @@ -201,9 +201,11 @@ "outputs": [], "source": [ "partitioner = dolfinx.mesh.create_cell_partitioner(dolfinx.mesh.GhostMode.shared_facet)\n", - "mesh, subdomains, boundaries_and_interfaces = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries_and_interfaces, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2, partitioner=partitioner)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries_and_interfaces is not None" ] }, { diff --git a/tutorials/07_understanding_restrictions/tutorial_understanding_restrictions.ipynb b/tutorials/07_understanding_restrictions/tutorial_understanding_restrictions.ipynb index 890a213..d504b18 100644 --- a/tutorials/07_understanding_restrictions/tutorial_understanding_restrictions.ipynb +++ b/tutorials/07_understanding_restrictions/tutorial_understanding_restrictions.ipynb @@ -311,9 +311,11 @@ "metadata": {}, "outputs": [], "source": [ - "mesh, subdomains, boundaries = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries is not None" ] }, { diff --git a/tutorials/08_singular_poisson/tutorial_create_nullspace.ipynb b/tutorials/08_singular_poisson/tutorial_create_nullspace.ipynb index 4f65532..a9bd07a 100644 --- a/tutorials/08_singular_poisson/tutorial_create_nullspace.ipynb +++ b/tutorials/08_singular_poisson/tutorial_create_nullspace.ipynb @@ -142,9 +142,11 @@ "outputs": [], "source": [ "partitioner = dolfinx.mesh.create_cell_partitioner(dolfinx.mesh.GhostMode.shared_facet)\n", - "mesh, subdomains, boundaries_and_interfaces = dolfinx.io.gmshio.model_to_mesh(\n", + "mesh, subdomains, boundaries_and_interfaces, *_ = dolfinx.io.gmshio.model_to_mesh(\n", " gmsh.model, comm=mpi4py.MPI.COMM_WORLD, rank=0, gdim=2, partitioner=partitioner)\n", - "gmsh.finalize()" + "gmsh.finalize()\n", + "assert subdomains is not None\n", + "assert boundaries_and_interfaces is not None" ] }, {