bugGNU Octave - Bugs: bug #47756, [ode suit] integrate_adaptive...

 
 

bug #47756: [ode suit] integrate_adaptive fails with vertical tspan

Submitter:  Juan Pablo Carbajal <juanpi>
Submitted:  Thu 21 Apr 2016 07:12:39 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  juanpi Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 15 Jul 2016 10:02:36 PM UTC, comment #4: 

I pushed Juan's patch (http://hg.savannah.gnu.org/hgweb/octave/rev/46ce9eb019a6) after testing that integrate_n_steps and integrate_const didn't need a fix as well.  Closing report.

Rik <rik5>
Group administrator
Tue 12 Jul 2016 04:58:46 PM UTC, comment #3: 

Assuming we just go with the original patch, do the other two private integrate functions (integrate_const, integrate_n_steps) also need the same change?

Rik <rik5>
Group administrator
Thu 07 Jul 2016 08:28:33 AM UTC, comment #2: 

The patch works fine for me too.

The other possibility would be to transpose the
's' vector inside 'hermite_quartic_interpolation'

Both ways seems reasonable to me

Jacopo Corno <jcorno>
Thu 07 Jul 2016 06:48:45 AM UTC, comment #1: 

Jacopo,

Did you review this patch?

It does fix the problem for me but
is it the correct aproach?

c.

Carlo de Falco <cdf>
Group Member
Thu 21 Apr 2016 07:12:39 PM UTC, original submission:  

When tspan is an array of vertical timestamps integrate_adaptive.m fails when attempting hermite interpolation, due to the size of the argument tspan(t_caught).

Example

pf   = [-0, -50, 0.25, 0.5, 0.65];
func =@(t,x) pf(1) * x(:) + pf(2) * (x(:) - pf(3)) .* (x(:) - pf(4)) .* (x(:) - pf(5));
opt  = odeset ('RelTol', 1e-6, ...
                'AbsTol', 1e-6, ...
                'InitialStep', 1e-3, ...
                'MaxStep', t(end) / 10);

t      = linspace (0,1,100).';
[t_ y] = ode45 (func, t, (-1:0.5:1).', opt);


The patch attached should fix the problem

Juan Pablo Carbajal <juanpi>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #36976:  integrate_adaptive.patch added by juanpi (843B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by cdf
  • -email is unavailable- added by cdf
  • -email is unavailable- added by juanpi (took care of porting from forge)
  • -email is unavailable- added by juanpi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-15 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-06-29 lachlan StatusNone Patch Submitted
    2016-04-27 cdf Carbon-Copy- Added -email is unavailable-
    2016-04-27 cdf Carbon-Copy- Added -email is unavailable-
    2016-04-26 juanpi Carbon-Copy- Added -email is unavailable-
    2016-04-21 juanpi Attached File- Added integrate_adaptive.patch, #36976

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code