Skip to content

Commit

Permalink
fix: unstructured tetra only take first 4 elements
Browse files Browse the repository at this point in the history
making compatible with p2
  • Loading branch information
lachlangrose committed Feb 6, 2024
1 parent e8a7877 commit 4673bbc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tetmesh based on cartesian grid for piecewise linear interpolation
"""

from ast import Tuple
import logging

Expand Down Expand Up @@ -114,7 +115,7 @@ def _init_face_table(self):
# use this to determine shared faces

element_nodes = coo_matrix(
(np.ones(elements.shape[0] * 4), (rows.ravel(), elements.ravel())),
(np.ones(elements.shape[0] * 4), (rows.ravel(), elements[:, :4].ravel())),
shape=(self.n_elements, self.n_nodes),
dtype=bool,
).tocsr()
Expand Down

0 comments on commit 4673bbc

Please sign in to comment.