diff scripts/ode/ode15s.m @ 23023:63a12df71848

avoid sparse jacobian tests for ode15i and ode15s if IDAKLU is missing * ode15i.m, ode15s.m: Use testif HAVE_SUNDIALS_IDAKLU for tests that require sparse Jacobians.
author John W. Eaton <jwe@octave.org>
date Sat, 07 Jan 2017 20:12:16 -0500
parents d92ec2901770
children e8a74d95b4f3
line wrap: on
line diff
--- a/scripts/ode/ode15s.m	Sat Jan 07 20:00:05 2017 -0500
+++ b/scripts/ode/ode15s.m	Sat Jan 07 20:12:16 2017 -0500
@@ -546,21 +546,21 @@
 %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 %! assert ([t(end), y(end,:)], frefrob, 1e-3);
 
-%!testif HAVE_SUNDIALS
+%!testif HAVE_SUNDIALS_IDAKLU
 %! opt = odeset ("MStateDependence", "none",
 %!               "Mass", [1, 0, 0; 0, 1, 0; 0, 0, 0],
 %!               "Jacobian", @jacfunsparse);
 %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 %! assert ([t(end), y(end,:)], frefrob, 1e-3);
 
-%!testif HAVE_SUNDIALS
+%!testif HAVE_SUNDIALS_IDAKLU
 %! opt = odeset ("MStateDependence", "none",
 %!               "Mass", sparse ([1, 0, 0; 0, 1, 0; 0, 0, 0]),
 %!               "Jacobian", @jacfunsparse);
 %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 %! assert ([t(end), y(end,:)], frefrob, 1e-3);
 
-%!testif HAVE_SUNDIALS
+%!testif HAVE_SUNDIALS_IDAKLU
 %! warning ("off", "ode15s:mass_state_dependent_provided", "local");
 %! opt = odeset ("MStateDependence", "none",
 %!               "Mass", @massdensefunstate,
@@ -576,14 +576,14 @@
 %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 %! assert ([t(end), y(end,:)], frefrob, 1e-3);
 
-%!testif HAVE_SUNDIALS
+%!testif HAVE_SUNDIALS_IDAKLU
 %! opt = odeset ("MStateDependence", "none",
 %!               "Mass", @massdensefuntime,
 %!               "Jacobian", @jacfunsparse);
 %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
 %! assert ([t(end), y(end,:)], frefrob, 1e-3);
 
-%!testif HAVE_SUNDIALS
+%!testif HAVE_SUNDIALS_IDAKLU
 %! opt = odeset ("MStateDependence", "none",
 %!               "Mass", @masssparsefuntime,
 %!               "Jacobian", @jacfunsparse);
@@ -683,7 +683,7 @@
 
 ## Mass option as sparse matrix
 %!testif HAVE_SUNDIALS
-%! opt = odeset ("Mass", speye (2)), "MStateDependence", "none");
+%! opt = odeset ("Mass", speye (2), "MStateDependence", "none");
 %! sol = ode15s (@fpol, [0, 2], [2, 0], opt);
 %! assert ([sol.x(end), sol.y(end,:)], [2, fref], 3e-3);