Skip to content

Commit 8c3430a

Browse files
committed
add docs for tag_to_group_faces
1 parent 2df7116 commit 8c3430a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

meshmode/mesh/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,13 +1416,21 @@ def vertex_index_map_func(vertices):
14161416

14171417

14181418
def _compute_facial_adjacency_from_vertices(
1419-
groups, element_id_dtype, face_id_dtype, tag_to_faces=None
1419+
groups: Sequence[MeshElementGroup],
1420+
element_id_dtype,
1421+
face_id_dtype,
1422+
tag_to_group_faces: Optional[Sequence[Mapping[Any, np.ndarray]]] = None
14201423
) -> Sequence[Sequence[FacialAdjacencyGroup]]:
1424+
"""
1425+
:arg tag_to_group_faces: for each group, a mapping from tag to
1426+
:class:`numpy.ndarray` of shape ``(2, nfaces)`` containing
1427+
the element and face indices of each tagged face in the group.
1428+
"""
14211429
if not groups:
14221430
return []
14231431

1424-
if tag_to_faces is None:
1425-
tag_to_faces = [{} for grp in groups]
1432+
if tag_to_group_faces is None:
1433+
tag_to_group_faces = [{} for grp in groups]
14261434

14271435
# Match up adjacent faces according to their vertex indices
14281436

@@ -1503,7 +1511,7 @@ def _compute_facial_adjacency_from_vertices(
15031511

15041512
is_tagged = np.full(len(bdry_elements), False)
15051513

1506-
for tag, tagged_elements_and_faces in tag_to_faces[igrp].items():
1514+
for tag, tagged_elements_and_faces in tag_to_group_faces[igrp].items():
15071515
face_index_pairs = _find_matching_index_pairs(
15081516
tagged_elements_and_faces.T,
15091517
np.stack((bdry_elements, bdry_element_faces)))

0 commit comments

Comments
 (0)