octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Review ode csets


From: Rik
Subject: Review ode csets
Date: Tue, 18 Oct 2016 11:40:17 -0700

10/18/16

Carlo,

Can you review this cset that I just committed? 
http://hg.savannah.gnu.org/hgweb/octave/rev/7efa2d0e22c9.

I changed OutputFcn to behave in a more Matlab-compatible way.  However,
part of the change was subtle.  When using the Refine option to generate
intermediate timesteps, OutputFcn was called for each of the timesteps. 
However, only the final call in the last timestep had the ability to halt
the solver by returning a value of TRUE.  This seemed wrong, but maybe
there was a reason for it.  The code is:

+            stop_solve = false;
             for ii = 1:numel (approxtime)
-              pltret = feval (options.OutputFcn, approxtime(ii),
-                              approxvals(:, ii), [],
-                              options.funarguments{:});
+              stop_solve = feval (options.OutputFcn,
+                                  approxtime(ii), approxvals(:, ii), [],
+                                  options.funarguments{:});
+              if (stop_solve)
+                break;  # break from inner loop
+              endif
             endfor
-            if (pltret)  # Leave main loop
+            if (stop_solve)  # Leave main loop

There is also a patch I submitted to https://savannah.gnu.org/bugs/?49364
that needs review.

Thanks,
Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]