diff --git a/docs/tutorial/examples/README.rst b/docs/tutorial/examples/README.rst index 62759094..7f98f88e 100644 --- a/docs/tutorial/examples/README.rst +++ b/docs/tutorial/examples/README.rst @@ -67,7 +67,6 @@ Finally, the result of the last completed substep is plotted. .. pyvista-plot:: :context: - :force_static: solid.plot("Principal Values of Cauchy Stress").show() diff --git a/src/felupe/mesh/_container.py b/src/felupe/mesh/_container.py index 631f6414..29ff3d95 100644 --- a/src/felupe/mesh/_container.py +++ b/src/felupe/mesh/_container.py @@ -82,6 +82,7 @@ class MeshContainer: .. pyvista-plot:: :include-source: True + :force_static: >>> import felupe as fem >>> @@ -171,6 +172,7 @@ def stack(self, idx=None): .. pyvista-plot:: :include-source: True + :force_static: >>> import felupe as fem >>> diff --git a/src/felupe/mesh/_dual.py b/src/felupe/mesh/_dual.py index d4a21fac..ae039e8d 100644 --- a/src/felupe/mesh/_dual.py +++ b/src/felupe/mesh/_dual.py @@ -74,19 +74,21 @@ def dual( Examples -------- - >>> import felupe as fem - >>> - >>> mesh = fem.Rectangle(n=5).add_midpoints_edges() - >>> region = fem.RegionQuadraticQuad(mesh=mesh) - >>> - >>> mesh_dual = fem.mesh.dual(mesh, points_per_cell=1, disconnect=False) - >>> region_dual = fem.RegionConstantQuad( - ... mesh_dual, quadrature=region.quadrature, grad=False - ... ) - >>> - >>> displacement = fem.FieldPlaneStrain(region, dim=2) - >>> pressure = fem.Field(region_dual) - >>> field = fem.FieldContainer([displacement, pressure]) + .. pyvista-plot:: + + >>> import felupe as fem + >>> + >>> mesh = fem.Rectangle(n=5).add_midpoints_edges() + >>> region = fem.RegionQuadraticQuad(mesh=mesh) + >>> + >>> mesh_dual = fem.mesh.dual(mesh, points_per_cell=1, disconnect=False) + >>> region_dual = fem.RegionConstantQuad( + ... mesh_dual, quadrature=region.quadrature, grad=False + ... ) + >>> + >>> displacement = fem.FieldPlaneStrain(region, dim=2) + >>> pressure = fem.Field(region_dual) + >>> field = fem.FieldContainer([displacement, pressure]) See Also -------- diff --git a/src/felupe/mesh/_geometry.py b/src/felupe/mesh/_geometry.py index 652abd20..50eb2920 100644 --- a/src/felupe/mesh/_geometry.py +++ b/src/felupe/mesh/_geometry.py @@ -76,11 +76,12 @@ class Line(Mesh): -------- .. pyvista-plot:: :include-source: True + :force_static: >>> import felupe as fem >>> >>> mesh = fem.mesh.Line(a=-2.1, b=3.5, n=3) - >>> mesh.plot().show() + >>> mesh.plot(line_width=8).show() >>> mesh @@ -125,6 +126,7 @@ class Rectangle(Mesh): -------- .. pyvista-plot:: :include-source: True + :force_static: >>> import felupe as fem >>> @@ -236,6 +238,7 @@ class Grid(Mesh): -------- .. pyvista-plot:: :include-source: True + :force_static: >>> import numpy as np >>> import felupe as fem @@ -299,6 +302,7 @@ class RectangleArbitraryOrderQuad(Rectangle): Examples -------- .. pyvista-plot:: + :force_static: >>> import felupe as fem >>> @@ -370,7 +374,7 @@ class Circle(Mesh): Examples -------- .. pyvista-plot:: - :include-source: True + :force_static: >>> import felupe as fem >>> @@ -475,6 +479,7 @@ class Triangle(Mesh): -------- .. pyvista-plot:: :include-source: True + :force_static: >>> import felupe as fem >>>