diff --git a/tests/geo/test_strainopt.py b/tests/geo/test_strainopt.py index 87069508e..4735c1b29 100644 --- a/tests/geo/test_strainopt.py +++ b/tests/geo/test_strainopt.py @@ -91,6 +91,7 @@ def subtest_binormal_curvature(self, order, centroid): J.x = dofs - eps*h f2 = J.J() errf = np.abs((f1-f2)/(2*eps) - df) + assert errf < 0.3 * errf_old errf_old = errf else: # Binormal curvature vanishes in Frenet frame @@ -115,7 +116,7 @@ def subtest_torsion(self, order, centroid): else: framedcurve = FramedCurveFrenet(c, rotation) - J = LPTorsionalStrainPenalty(framedcurve, width=1e-3, p=2, threshold=1e-4) + J = LPTorsionalStrainPenalty(framedcurve, width=1e-3, p=2, threshold=1e-8) dofs = J.x @@ -131,5 +132,6 @@ def subtest_torsion(self, order, centroid): J.x = dofs - eps*h f2 = J.J() errf = np.abs((f1-f2)/(2*eps) - df) + assert errf < 0.3 * errf_old errf_old = errf