Skip to content

Commit a444aa3

Browse files
committed
Add tolerance for geometrical operation on low precision (#218)
1 parent 1d95096 commit a444aa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/tests/test_multispace_mpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ def test_multiple_mpc_spaces_sparsity(cell_type, deg, N):
2929

3030
V = fem.functionspace(domain, element("Lagrange", domain.basix_cell(), deg, dtype=default_real_type))
3131
Q = V.clone()
32+
atol = 10 * np.finfo(default_real_type).eps
3233

3334
def periodic_boundary(x):
34-
return np.logical_or(np.isclose(x[0], 1), np.isclose(x[2], 1))
35+
return np.logical_or(np.isclose(x[0], 1, atol=atol), np.isclose(x[2], 1, atol=atol))
3536

3637
def periodic_map(x):
3738
out = x.copy()

0 commit comments

Comments
 (0)