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 4626afb commit c21538c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/felupe/mechanics/_multipoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ 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 = mpc.plot()
>>> plotter = pv.Plotter()
>>> actor_1 = plotter.add_points(
... mesh.points[mpc.points],
... point_size=16,
Expand All @@ -100,7 +102,7 @@ class MultiPointConstraint:
... point_size=16,
... color="green",
... )
>>> mesh.plot(plotter=plotter).show()
>>> mesh.plot(plotter=mpc.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 @@ -125,7 +127,8 @@ class MultiPointConstraint:
:context:
:force_static:
>>> plotter = mpc.plot()
>>> plotter = pv.Plotter()
>>>
>>> actor_1 = plotter.add_points(
... mesh.points[mpc.points] + displacement.values[mpc.points],
... point_size=16,
Expand All @@ -136,7 +139,9 @@ class MultiPointConstraint:
... point_size=16,
... color="green",
... )
>>> field.plot("Displacement", component=None, plotter=plotter).show()
>>> field.plot(
... "Displacement", component=None, plotter=mpc.plot(plotter=plotter)
... ).show()
See Also
--------
Expand Down

0 comments on commit c21538c

Please sign in to comment.