Skip to content

Commit

Permalink
doc: improved
Browse files Browse the repository at this point in the history
  • Loading branch information
leuraph committed Mar 20, 2024
1 parent 09d11b0 commit a0016af
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion p1afempy/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ def complete_boundaries(elements: data_structures.ElementsType,
-------
completed_boundaries: list[data_structures.BoundaryType]
a coomplete list of boundaries of the elements given
example
-------
>>> elements = np.array([[0, 1, 2], [0, 2, 3]])
>>> boundary = np.array([[0, 1], [1, 2]])
>>> completed_boundaries = complete_boundaries(
>>> elements, [boundary])
>>> completed_boundaries
[array([[0, 1], [1, 2]]), array([[2, 3], [3, 0]])]
"""
element_indices_i = elements.flatten()
element_indices_j = elements[:, [1, 2, 0]].flatten()
Expand Down Expand Up @@ -231,7 +240,9 @@ def get_local_patch(coordinates: data_structures.CoordinatesType,
data_structures.ElementsType,
list[data_structures.BoundaryType]]:
"""
returns the local mesh corresponding to k-th element
returns the local mesh corresponding to the k-th element
and its immediate neightbours, i.e. elements that share an edge
with the selected k-th element
parameters
----------
Expand Down

0 comments on commit a0016af

Please sign in to comment.