comparison scripts/ode/ode15i.m @ 30895:360d330cc30e

don't change ode options.havejacfun (reverts part of e1788b1a315f) * ode15i.m, ode15s.m: Revert change of havejacfun -> havejacfcn field name used in options struct that is passed to __ode15__. If we change that field, we'll also need to change __ode15__, possibly providing a path for backward compatibility?
author John W. Eaton <jwe@octave.org>
date Tue, 05 Apr 2022 01:06:00 -0400
parents e1788b1a315f
children 260ce8667d96
comparison
equal deleted inserted replaced
30894:9c686fa8132e 30895:360d330cc30e
170 classes, attributes, solver); 170 classes, attributes, solver);
171 171
172 ## Jacobian 172 ## Jacobian
173 options.havejac = false; 173 options.havejac = false;
174 options.havejacsparse = false; 174 options.havejacsparse = false;
175 options.havejacfcn = false; 175 options.havejacfun = false;
176 176
177 if (! isempty (options.Jacobian)) 177 if (! isempty (options.Jacobian))
178 options.havejac = true; 178 options.havejac = true;
179 if (iscell (options.Jacobian)) 179 if (iscell (options.Jacobian))
180 if (numel (options.Jacobian) == 2) 180 if (numel (options.Jacobian) == 2)
194 error ("Octave:invalid-input-arg", 194 error ("Octave:invalid-input-arg",
195 'ode15i: invalid value assigned to field "Jacobian"'); 195 'ode15i: invalid value assigned to field "Jacobian"');
196 endif 196 endif
197 197
198 elseif (is_function_handle (options.Jacobian)) 198 elseif (is_function_handle (options.Jacobian))
199 options.havejacfcn = true; 199 options.havejacfun = true;
200 if (nargin (options.Jacobian) == 3) 200 if (nargin (options.Jacobian) == 3)
201 [J1, J2] = options.Jacobian (trange(1), y0, yp0); 201 [J1, J2] = options.Jacobian (trange(1), y0, yp0);
202 202
203 if ( ! issquare (J1) || rows (J1) != n 203 if ( ! issquare (J1) || rows (J1) != n
204 || ! isnumeric (J1) || ! isreal (J1) 204 || ! isnumeric (J1) || ! isreal (J1)