[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46106] ode45: FSAL property not used, solver
From: |
Carlo de Falco |
Subject: |
[Octave-bug-tracker] [bug #46106] ode45: FSAL property not used, solver fail if it is activated |
Date: |
Fri, 02 Oct 2015 16:27:46 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:41.0) Gecko/20100101 Firefox/41.0 |
URL:
<http://savannah.gnu.org/bugs/?46106>
Summary: ode45: FSAL property not used, solver fail if it is
activated
Project: GNU Octave
Submitted by: cdf
Submitted on: Fri 02 Oct 2015 06:27:44 PM CEST
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: Need Info
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Hi,
Looking at the code in "runge_kutta_45_dorpri.m"
I noticed the following lines:
options = varargin{1};
k = zeros (size (x, 1), 4);
if (nargin == 5) # only the options are passed
k(:,1) = feval (f, t , x, options.vfunarguments{:});
elseif (nargin == 6) # both the options and the k values are passed
k(:,1) = varargin{2}(:,end); # FSAL property
endif
k(:,1) = feval (f, t, x, options.vfunarguments{:});
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 02 Oct 2015 06:27:45 PM CEST Name: open_8IkppQnp.txt Size: 3kB
By: cdf
<http://savannah.gnu.org/bugs/download.php?file_id=35036>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46106>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46106] ode45: FSAL property not used, solver fail if it is activated,
Carlo de Falco <=