Skip to content

Commit

Permalink
DOC: Corrected marker in the tutorial for boundary conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
carsten-forty2 committed Jan 13, 2025
1 parent e5a5460 commit 2b6bcae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/tutorials/2_modelling/plot_3-mod-fem-BC.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def uDirichlet(boundary):
# Alternatively we can define the gradients of the solution on the boundary,
# i.e., Neumann type BC. This is done with another dictionary {marker: value} and passed by the bc dictionary.
neumannBC = {1: -0.5, # left
4: 2.5} # bottom
3: 2.5} # bottom

dirichletBC = {3: 1.0} # top
dirichletBC = {4: 1.0} # top

u = solve(grid, f=0., bc={'Dirichlet': dirichletBC, 'Neumann': neumannBC})

Expand Down
1 change: 1 addition & 0 deletions pygimli/meshtools/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def createMesh(poly, quality=32, area=0.0, smooth=None, switches=None,
isinstance(poly, pg.PosVector) or \
(isinstance(poly, np.ndarray) and poly.ndim == 2):
delPLC = pg.Mesh(2)
delPLC.createNodes(poly)
for p in poly:
delPLC.createNode(p[0], p[1], 0.0)
return createMesh(delPLC, switches='-zeY', **kwargs)
Expand Down

0 comments on commit 2b6bcae

Please sign in to comment.