Skip to content

Commit f34a3ce

Browse files
committed
reactivate all tests
1 parent d748208 commit f34a3ce

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

python/tests/test_tetrahedron.py

+24-24
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,32 @@ def test_tetrahedron_interior(ls_values, vol_ex):
3535
vol = cut_cell.volume()
3636
print(vol)
3737

38-
assert np.isclose(vol,0.0)
38+
assert np.isclose(vol,vol_ex)
3939

40-
# level_set_values = [(np.array([0.1,-0.1,0.2,0.2]),68./27.),
41-
# (np.array([-0.1,0.1,0.2,0.2]),68./27.),
42-
# (np.array([0.1,0.1,-0.2,0.2]),56./27.),
43-
# (np.array([-0.1,-0.1,0.2,0.2]),160./81.),
44-
# (np.array([0.1,-0.1,-0.2,0.2]),4./3.),
45-
# (np.array([-0.1,0.1,-0.2,0.2]),4./3.),
46-
# (np.array([0.1,-0.1,0.2,-0.2]),4./3.),
47-
# (np.array([-0.1,0.1,0.2,-0.2]),4./3.),
48-
# (np.array([0.1,0.1,-0.2,-0.2]),56./81.),
49-
# (np.array([-0.1,-0.1,0.2,-0.2]),16./27.),
50-
# (np.array([0.1,-0.1,-0.2,-0.2]),4./27.),
51-
# (np.array([-0.1,0.1,-0.2,-0.2]),4./27.),
52-
# (np.array([0.1,0.1,0.2,-0.2]),56./27.),
53-
# (np.array([-0.1,-0.1,-0.2,0.2]),16./27.)]
40+
level_set_values = [(np.array([0.1,-0.1,0.2,0.2]),68./27.),
41+
(np.array([-0.1,0.1,0.2,0.2]),68./27.),
42+
(np.array([0.1,0.1,-0.2,0.2]),56./27.),
43+
(np.array([-0.1,-0.1,0.2,0.2]),160./81.),
44+
(np.array([0.1,-0.1,-0.2,0.2]),4./3.),
45+
(np.array([-0.1,0.1,-0.2,0.2]),4./3.),
46+
(np.array([0.1,-0.1,0.2,-0.2]),4./3.),
47+
(np.array([-0.1,0.1,0.2,-0.2]),4./3.),
48+
(np.array([0.1,0.1,-0.2,-0.2]),56./81.),
49+
(np.array([-0.1,-0.1,0.2,-0.2]),16./27.),
50+
(np.array([0.1,-0.1,-0.2,-0.2]),4./27.),
51+
(np.array([-0.1,0.1,-0.2,-0.2]),4./27.),
52+
(np.array([0.1,0.1,0.2,-0.2]),56./27.),
53+
(np.array([-0.1,-0.1,-0.2,0.2]),16./27.)]
5454

55-
# @pytest.mark.parametrize("ls_values, vol_ex", level_set_values)
56-
# def test_tetrahedron_exterior(ls_values, vol_ex):
57-
# vertex_coordinates = np.array([1.,1.,1., 1.,-1., -1., -1, 1., -1., -1., -1, 1])
55+
@pytest.mark.parametrize("ls_values, vol_ex", level_set_values)
56+
def test_tetrahedron_exterior(ls_values, vol_ex):
57+
vertex_coordinates = np.array([1.,1.,1., 1.,-1., -1., -1, 1., -1., -1., -1, 1])
5858

59-
# cell_type = cutcells.CellType.tetrahedron
60-
# triangulate = True
61-
# gdim = 3
59+
cell_type = cutcells.CellType.tetrahedron
60+
triangulate = True
61+
gdim = 3
6262

63-
# cut_cell = cutcells.cut(cell_type, vertex_coordinates, gdim, ls_values, "phi>0", triangulate)
64-
# vol = cut_cell.volume()
63+
cut_cell = cutcells.cut(cell_type, vertex_coordinates, gdim, ls_values, "phi>0", triangulate)
64+
vol = cut_cell.volume()
6565

66-
# assert np.isclose(vol,vol_ex)
66+
assert np.isclose(vol,vol_ex)

0 commit comments

Comments
 (0)