Skip to content

Commit

Permalink
test_oriented_saveload
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmcbain committed Feb 2, 2022
1 parent ba13f93 commit 5e17b75
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions tests/test_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,19 +600,14 @@ def test_oriented_gauss_integral(m, e):
)


## TODO preserve orientation in save/load cycle
# def test_oriented_saveload():

# m = MeshTri().refined(4)
# m = m.with_boundaries({
# 'mid': m.facets_around([5]),
# })
# assert len(m.boundaries['mid'].ori) == 3

# # cycle to meshio and check that orientation is preserved
# M = from_meshio(to_meshio(m))

# assert_almost_equal(
# m.boundaries['mid'].ori,
# M.boundaries['mid'].ori,
# )
def test_oriented_saveload():

m = MeshTri().refined(4)
m = m.with_boundaries({"mid": m.facets_around([5]),})
assert len(m.boundaries["mid"].ori) == 3

M = from_meshio(to_meshio(m))

assert_almost_equal(
m.boundaries["mid"].ori, M.boundaries["mid"].ori,
)

0 comments on commit 5e17b75

Please sign in to comment.