Skip to content

Commit

Permalink
Update _multipoint.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Oct 16, 2024
1 parent 29c0931 commit 4626afb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/felupe/mechanics/_multipoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ class MultiPointConstraint:
:context:
:force_static:
>>> import pyvista as pv
>>>
>>> mpc = fem.MultiPointConstraint(
... field=field,
... points=np.arange(mesh.npoints)[mesh.x == 1],
... centerpoint=-1,
... )
>>>
>>> plotter = pv.Plotter()
>>> plotter = mpc.plot()
>>> actor_1 = plotter.add_points(
... mesh.points[mpc.points],
... point_size=16,
Expand All @@ -102,7 +100,7 @@ class MultiPointConstraint:
... point_size=16,
... color="green",
... )
>>> mesh.plot(plotter=mpc.plot(plotter=plotter)).show()
>>> mesh.plot(plotter=plotter).show()
The mesh is fixed on the left end face and a ramped :class:`~felupe.PointLoad` is
applied on the center-point of the :class:`~felupe.MultiPointConstraint`. All items
Expand All @@ -127,7 +125,7 @@ class MultiPointConstraint:
:context:
:force_static:
>>> plotter = pv.Plotter()
>>> plotter = mpc.plot()
>>> actor_1 = plotter.add_points(
... mesh.points[mpc.points] + displacement.values[mpc.points],
... point_size=16,
Expand All @@ -138,9 +136,7 @@ class MultiPointConstraint:
... point_size=16,
... color="green",
... )
>>> field.plot(
... "Displacement", component=None, plotter=mpc.plot(plotter=plotter)
... ).show()
>>> field.plot("Displacement", component=None, plotter=plotter).show()
See Also
--------
Expand Down

0 comments on commit 4626afb

Please sign in to comment.