Skip to content

Commit

Permalink
specify edge tests to tet and hex
Browse files Browse the repository at this point in the history
  • Loading branch information
vohonen committed Jun 13, 2024
1 parent 22012a1 commit 4375b0f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/test_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,17 +793,18 @@ def test_incidence(mesh):
for itr in range(0, 50, 3):
assert np.sum((mesh.facets == itr).any(axis=0)) == len(p2f[:, itr].data)

p2e = mesh.p2e
for itr in range(0, 50, 3):
assert np.sum((mesh.edges == itr).any(axis=0)) == len(p2e[:, itr].data)

e2t = mesh.e2t
for itr in range(0, 50, 3):
e = mesh.edges[:, itr]
datalen = np.sum(
(mesh.t == e[0]).any(axis=0) & (mesh.t == e[1]).any(axis=0)
)
assert datalen == len(e2t[:, itr].data)
if isinstance(mesh, (MeshTet1, MeshHex1)):
p2e = mesh.p2e
for itr in range(0, 50, 3):
assert np.sum((mesh.edges == itr).any(axis=0)) == len(p2e[:, itr].data)

e2t = mesh.e2t
for itr in range(0, 50, 3):
e = mesh.edges[:, itr]
datalen = np.sum(
(mesh.t == e[0]).any(axis=0) & (mesh.t == e[1]).any(axis=0)
)
assert datalen == len(e2t[:, itr].data)

def test_restrict_tags_boundary():

Expand Down

0 comments on commit 4375b0f

Please sign in to comment.