Skip to content

Commit

Permalink
Update ex10_poisson-equation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Dec 2, 2024
1 parent 6c0afa2 commit 1985d46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/ex10_poisson-equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@
\ d\Omega = \int_\Omega \delta u \cdot f \ d\Omega
"""

# sphinx_gallery_thumbnail_number = -1
import felupe as fem

mesh = fem.Rectangle(n=2**5).triangulate()
region = fem.RegionTriangle(mesh)
u = fem.Field(region, dim=1)
field = fem.FieldContainer([u])

boundaries = dict(
boundaries = fem.BoundaryDict(
bottom=fem.Boundary(u, fy=0),
top=fem.Boundary(u, fy=1),
left=fem.Boundary(u, fx=0),
right=fem.Boundary(u, fx=1),
)
boundaries.plot(show_lines=False).show()

solid = fem.SolidBody(umat=fem.Laplace(), field=field)
load = fem.SolidBodyForce(field=field, values=1.0)
Expand Down

0 comments on commit 1985d46

Please sign in to comment.