bugGNU Octave - Bugs: bug #31626, lsode: patch to make Jacobian...

 
 

bug #31626: lsode: patch to make Jacobian types of dlsode.f accessible

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Fri 12 Nov 2010 08:11:41 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: Patch SubmittedAssigned to: None
Originator Name: Olaf TillOpen/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 06 Sep 2017 06:08:15 AM UTC, comment #3:

Not 2, but 7 years. Before updating the patch, I'd need an indication that the patch, once properly tidied up, will actually be allowed to be applied.

Olaf Till <i7tiol>
Project Member
Tue 05 Sep 2017 08:17:31 PM UTC, comment #2:

After almost 2 years of waiting, the patch can't be applied.
Can someone make a new patch?

Avinoam Kalma <avinoam>
Project Member
Sat 28 Nov 2015 09:03:30 AM UTC, comment #1:

This patch seems mildly useful and straightforward.

I've updated this patch to apply cleanly to the current Mercurial repository.

I recommend that it either be applied, or its priority be reduced.

(file #35584)

Lachlan Andrew <lachlan>
Project Member
Fri 12 Nov 2010 08:11:41 AM UTC, original submission:

With the BDF method, dlsode.f is able to approximate only a diagonal or banded Jacobian (Method flag: 23, 25) and to use only a banded part of a user supplied Jacobian (Method flag: 24). This is useful for efficiency. But as yet lsode offers no interface to this. The attached patch changes this.

1. In liboctave/LSODE-opts.in, options "jacobian type" (values: "full" (default), "banded", "diagonal"), "lower jacobian subdiagonals", and "upper jacobian subdiagonals" (for use with a "jacobian type" of "banded") are introduced.

2. In liboctave/LSODE.cc, the corresponding values of method_flag are set and iwork(0) and iwork(1) are set to "lower jacobian subdiagonals" and "upper jacobian subdiagonals", respectively. Since except for method_flag == 24 the user-supplied Jacobian must (according to dlsode.f) ignore the arguments "lower jacobian subdiagonals" (ML) and "upper jacobian subdiagonals" (MU), a new file-scope variable tells lsode_j when to ignore them. With method_flag == 24, lsode_j fills only the required subdiagonals of the user-supplied Jacobian into the allocated memory as specified by dlsode.f.

I think the actual user-programmed Jacobian function need not be passed ML and MU (this would necessitate much more changes), since the user knows which "lower jacobian subdiagonals" and "upper jacobian subdiagonals" he sets for lsode and can provide these to his Jacobian-function himself, if desired.

For testing the new features and seeing the time-savings, a function 'odetest' returning a structure with two test-problems and a script 'odetest_script' which uses this function are also attached.

Note: It may be necessary to fix bug #31623 before testing (I had to do it for me), for 'lsode' to be able to see settings changed with 'lsode_options'. I'm not sure whether bug #31623 affects every system.

Olaf Till <i7tiol>
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 #35584:  patch_31626.txt added by lachlan (6KiB - text/plain - Updated to current (2015-11-28) mercurial version)
file #21986:  lsode-jacobian-types.changeset added by i7tiol (6KiB - application/octet-stream)
file #21987:  odetest.m added by i7tiol (3KiB - text/x-objcsrc)
file #21988:  odetest_script.m added by i7tiol (3KiB - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by i7tiol (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 28 Nov 2015 09:03:30 AM UTClachlanAttached File-=>Added patch_31626.txt, #35584
    Thu 04 Aug 2011 06:00:22 AM UTCrik5Carbon-CopyRemoved 72865=>-
    Thu 04 Aug 2011 06:00:11 AM UTCrik5StatusNone=>Patch Submitted
    Fri 12 Nov 2010 08:11:41 AM UTCi7tiolAttached File-=>Added lsode-jacobian-types.changeset, #21986
      Attached File-=>Added odetest.m, #21987
      Attached File-=>Added odetest_script.m, #21988

    Back to the top


    Powered by Savane 3.1-cleanup1