bugGNU Octave - Bugs: bug #46106, ode45: FSAL property not used,...

 
 

bug #46106: ode45: FSAL property not used, solver fail if it is activated

Submitted by:  Carlo de Falco <cdf>
Submitted on:  Fri 02 Oct 2015 04:27:44 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: In ProgressAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 11 Oct 2015 04:53:00 PM UTC, comment #2:

Hi,

I just pushed this changeset: http://hg.savannah.gnu.org/hgweb/octave/rev/a22d8a2eb0e5

in order to make the adaptive stepping algorithm more matlab
compatible.

As this changeset i also, as a byproduct, solving the k_vals issue, I am now closing this ticket.

BTW, It seems another by-product is a further small enhancement of performance:

Carlo de Falco <cdf>
Project Member
Sat 03 Oct 2015 05:32:19 AM UTC, comment #1:

Hi,

I'm pushing the new attached patch (file #35045) which
seems to fix the issue of failing integration with FSAL.

The problem was that when a time step was rejected the solution
would be thrown away but not the "k_vals".

Here is a performance comparison with and without the
patch.

with patch:

without patch:

It would probably be cleaner to check for empty "k_vals"
inside the stepper rather than in the integrator, but that
would require changing other steppers that are not yet in core.

Therefore I am pushing the changeset but I'll leave the bug
open so we remember to cleanup later.

Carlo de Falco <cdf>
Project Member
Fri 02 Oct 2015 04:27:44 PM UTC, original submission:

Hi,

Looking at the code in "runge_kutta_45_dorpri.m"
I noticed the following lines:

It seems to me that

1) the check for nargin == 5 is ignored as options = varargin{1} is set in any case
2) if previously computed stages are passed, the FSAL property is not exploited as
k(:, 1) is overwritten any way

the attached patch tries to fix this and avoid unnecessary fevals to improve performance but if I apply the patch the solver fails.

I suspect similar problems apply to other RK steppers that have the FSAL property.

c.

Carlo de Falco <cdf>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35045:  open_npmRwQk8.txt added by cdf (12KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cdf (Submitted the item)
  • -unavailable- added by cdf
  • -unavailable- added by cdf
  • -unavailable- added by cdf
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Oct 2015 04:53:00 PM UTCcdfOpen/ClosedOpen=>Closed
    Sat 03 Oct 2015 05:32:19 AM UTCcdfStatusNeed Info=>In Progress
    Sat 03 Oct 2015 05:25:21 AM UTCcdfAttached File-=>Added open_npmRwQk8.txt, #35045
    Sat 03 Oct 2015 05:23:14 AM UTCcdfAttached File#35036=>Removed
    Fri 02 Oct 2015 04:27:45 PM UTCcdfAttached File-=>Added open_8IkppQnp.txt, #35036
      Carbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1