[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31626] lsode: patch to make Jacobian types of
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #31626] lsode: patch to make Jacobian types of dlsode.f accessible |
Date: |
Fri, 12 Nov 2010 08:11:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.19) Gecko/2010091807 Iceweasel/3.0.6 (Debian-3.0.6-3) |
URL:
<http://savannah.gnu.org/bugs/?31626>
Summary: lsode: patch to make Jacobian types of dlsode.f
accessible
Project: GNU Octave
Submitted by: i7tiol
Submitted on: Fri 12 Nov 2010 08:11:41 AM GMT
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name: Olaf Till
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 12 Nov 2010 08:11:41 AM GMT Name: lsode-jacobian-types.changeset
Size: 6kB By: i7tiol
<http://savannah.gnu.org/bugs/download.php?file_id=21986>
-------------------------------------------------------
Date: Fri 12 Nov 2010 08:11:41 AM GMT Name: odetest.m Size: 3kB By:
i7tiol
<http://savannah.gnu.org/bugs/download.php?file_id=21987>
-------------------------------------------------------
Date: Fri 12 Nov 2010 08:11:41 AM GMT Name: odetest_script.m Size: 3kB
By: i7tiol
<http://savannah.gnu.org/bugs/download.php?file_id=21988>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31626>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #31626] lsode: patch to make Jacobian types of dlsode.f accessible,
Olaf Till <=