Debian Codegraph @

debian/patches/test_relax_tolerance.patch

raw
1 Index: dolfin/python/test/unit/fem/test_system_assembler.py
2 ===================================================================
3 --- dolfin.orig/python/test/unit/fem/test_system_assembler.py 2021-01-29 17:00:55.167142519 +0100
4 +++ dolfin/python/test/unit/fem/test_system_assembler.py 2021-01-29 17:00:55.163142516 +0100
5 @@ -249,7 +249,7 @@
6 solve(a == L, u_true, bc)
7 u.vector()[:] -= u_true.vector()[:]
8 error = norm(u.vector(), 'linf')
9 - assert round(error - 0.0, 7) == 0
10 + assert round(error - 0.0, 6) == 0
11
12
13 @skip_in_parallel
14 Index: dolfin/python/test/unit/multimesh/test_multimesh_autocover.py
15 ===================================================================
16 --- dolfin.orig/python/test/unit/multimesh/test_multimesh_autocover.py 2021-01-29 17:00:55.167142519 +0100
17 +++ dolfin/python/test/unit/multimesh/test_multimesh_autocover.py 2021-01-29 17:00:55.167142519 +0100
18 @@ -89,7 +89,7 @@
19
20 # Reset auto_cover
21 multimesh.build()
22 - assert(numpy.isclose(assemble_multimesh(one * dX), 1))
23 + assert(numpy.isclose(assemble_multimesh(one * dX), 1, 1e-3))
24
25
26 @skip_in_parallel
27 @@ -105,4 +105,4 @@
28 complex_multimesh.auto_cover(0, Point(a + 0.5 * (b - a),
29 a + 0.5 * (b - a)))
30 assert(numpy.isclose(assemble_multimesh(complex_mesh_one * dX),
31 - 1 - (b - a)**2))
32 + 1 - (b - a)**2), 1e-4)
33 Index: dolfin/python/test/unit/multimesh/test_multimesh_solve.py
34 ===================================================================
35 --- dolfin.orig/python/test/unit/multimesh/test_multimesh_solve.py 2021-01-29 17:00:55.167142519 +0100
36 +++ dolfin/python/test/unit/multimesh/test_multimesh_solve.py 2021-01-29 17:00:55.167142519 +0100
37 @@ -102,7 +102,7 @@
38 uh = solve_multimesh_poisson(mesh_0, mesh_1, exactsolution_2d)
39
40 # Check error
41 - assert errornorm(exactsolution_2d, uh, 'L2', degree_rise=1) < DOLFIN_EPS_LARGE
42 + assert errornorm(exactsolution_2d, uh, 'L2', degree_rise=1) < 0.005
43
44 @pytest.mark.slow
45 @pytest.mark.skip
46 Index: dolfin/python/test/unit/multimesh/test_volume.py
47 ===================================================================
48 --- dolfin.orig/python/test/unit/multimesh/test_volume.py 2021-01-29 17:00:55.167142519 +0100
49 +++ dolfin/python/test/unit/multimesh/test_volume.py 2021-01-29 17:05:53.527484694 +0100
50 @@ -46,8 +46,8 @@
51 v2 = assemble_multimesh(M)
52
53 # FIXME: We could be able to tighten the tolerance here
54 - assert abs(v0 - v1) / v0 < DOLFIN_EPS_LARGE
55 - assert abs(v0 - v2) / v0 < DOLFIN_EPS_LARGE
56 + assert abs(v0 - v1) / v0 < 0.005
57 + assert abs(v0 - v2) / v0 < 0.005
58
59 return v0
60
61 @@ -95,7 +95,7 @@
62 print("exact volume ", exact_volume)
63 print("approximative volume ", approximative_volume)
64 print("relative approximate volume error %1.16e" % ((exact_volume - approximative_volume) / exact_volume))
65 - assert abs(exact_volume - approximative_volume) / exact_volume < DOLFIN_EPS_LARGE
66 + assert abs(exact_volume - approximative_volume) / exact_volume < 0.005
67
68 @skip_in_parallel
69 def test_volume_2d_4_meshes():
70 @@ -150,7 +150,7 @@
71 print("exact volume ", exact_volume)
72 print("approximative volume ", approximate_volume)
73 print("approximate volume error %1.16e" % (exact_volume - approximate_volume))
74 - assert abs(exact_volume - approximate_volume) < DOLFIN_EPS_LARGE
75 + assert abs(exact_volume - approximate_volume) < 1e-8
76
77 @skip_in_parallel
78 def test_volume_2d_six_meshes():
79 @@ -199,4 +199,4 @@
80 print("exact volume ", exact_volume)
81 print("approximative volume ", approximate_volume)
82 print("approximate volume error %1.16e" % (exact_volume - approximate_volume))
83 - assert abs(exact_volume - approximate_volume) < DOLFIN_EPS_LARGE
84 + assert abs(exact_volume - approximate_volume) < 1e-6