@@ -56,16 +56,18 @@ def _test_inhomogeneous_numerically_zero(self, late_ltd_check, late_ltp_check):
5656 solver_dict ["parameters" ]["late_ltd_check" ] = late_ltd_check
5757 solver_dict ["parameters" ]["late_ltp_check" ] = late_ltp_check
5858
59+ z0 = 0.0 # set the initial condition
5960 dt = .1
6061 T = 100.
61- timevec = np . arange ( 0. , T , dt )
62+
6263
6364 #
6465 # integration using the ODE-toolbox analytic integrator
6566 #
6667
68+ timevec = np .arange (0. , T , dt )
6769 analytic_integrator = AnalyticIntegrator (solver_dict )
68- analytic_integrator .set_initial_values ({"z" : 0. })
70+ analytic_integrator .set_initial_values ({"z" : z0 })
6971 analytic_integrator .reset ()
7072 actual = [analytic_integrator .get_value (t )["z" ] for t in timevec ]
7173
@@ -83,7 +85,6 @@ def ode_model(z, t, p, late_ltp_check, late_ltd_check, tau_z):
8385 dzdt = (((p * (1.0 - z ) * late_ltp_check ) - (p * (z + 0.5 ) * late_ltd_check ))) / tau_z
8486 return dzdt
8587
86- z0 = 0.0 # set the initial condition
8788 params = solver_dict ["parameters" ]
8889 ode_args = (
8990 params ["p" ],
@@ -122,11 +123,9 @@ def ode_model(z, t, p, late_ltp_check, late_ltd_check, tau_z):
122123
123124 np .testing .assert_allclose (correct , actual )
124125
125- @pytest .mark .xfail (strict = True , raises = AssertionError )
126126 def test_inhomogeneous_numerically_zero (self ):
127127 self ._test_inhomogeneous_numerically_zero (late_ltd_check = 1. , late_ltp_check = - 1. )
128128
129- @pytest .mark .xfail (strict = True , raises = AssertionError )
130129 def test_inhomogeneous_numerically_zero_alt (self ):
131130 self ._test_inhomogeneous_numerically_zero (late_ltd_check = 0. , late_ltp_check = 0. )
132131
0 commit comments