From 7f8a3261149e4fb2ca7adb3c9837b74e22ab5311 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 21 Jul 2019 22:06:24 -0700 Subject: [PATCH] Loosen tolerances on tests --- fdfd_tools/test_fdtd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdfd_tools/test_fdtd.py b/fdfd_tools/test_fdtd.py index bc995c1..a88ca75 100644 --- a/fdfd_tools/test_fdtd.py +++ b/fdfd_tools/test_fdtd.py @@ -62,7 +62,7 @@ class BasicTests(): du_half_h2e = u_estep - u_hstep div_s_h2e = self.dt * fdtd.poynting_divergence(e=self.es[ii], h=self.hs[ii], dxes=self.dxes) - self.assertTrue(numpy.allclose(du_half_h2e, -div_s_h2e)) + self.assertTrue(numpy.allclose(du_half_h2e, -div_s_h2e, rtol=1e-4)) if u_eprev is None: u_eprev = u_estep @@ -71,7 +71,7 @@ class BasicTests(): # previous half-step du_half_e2h = u_hstep - u_eprev div_s_e2h = self.dt * fdtd.poynting_divergence(e=self.es[ii-1], h=self.hs[ii], dxes=self.dxes) - self.assertTrue(numpy.allclose(du_half_e2h, -div_s_e2h)) + self.assertTrue(numpy.allclose(du_half_e2h, -div_s_e2h, rtol=1e-4)) u_eprev = u_estep