[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45,
From: |
Ken Marek |
Subject: |
[Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s) |
Date: |
Wed, 5 Oct 2022 15:38:33 -0400 (EDT) |
Follow-up Comment #3, bug #63162 (project octave):
Thanks for the information. I'm happy to back out those changes and keep
sending along extra arguments to everything if that's what you want; in that
case the documentation should also be updated to let users know about the
feature, even if it's being deprecated.
Patch file is attached. You will need to first apply the patch from Bug
#63063, Comment #21.
I also forgot to mention some changes to runge_kutta_interpolate.m. I could
not find any function calling it that did not send a valid k_value matrix, so
the function evaluation backups were unneeded. I removed them and the
corresponding function input arguments. Otherwise I think all the changes not
already mentioned are just documentation.
Since I'm posting a patch, let's do the results too:
octave:130> test_file
Elapsed time is 0.089494 seconds. % cleared memory
Elapsed time is 0.0599439 seconds. % subsequent run
y2 function errors:
t error of event: 6.6613e-16
y error of "true" root: 4.4409e-16
y error of Event root, as reported by event: 2.0123e-15
y error of Event root, from y2(t_event): 3.1086e-15
y7 function errors:
t error of event: 1.8769e-08 5.246e-07
y error of "true" root: 3.1086e-15 4.2633e-14
y error of Event root, as reported by event: 2.5275e-15 4.2077e-14
y error of Event root, from y7(t_event): 9.9752e-08 1.8531e-05
You can see that the Octave run time increases a bit (19% first run, or 5%
subsequent for this test case), but we also get results within an order of
magnitude of the Matlab results, which is a huge improvement in accuracy. The
patch also includes updated tolerances on the file tests for ode23/45 files -
Events tests. The test cases now improve accuracy by about 2 decimal places.
Ode23s didn't have those tests, so I added them as well.
(file #53797)
_______________________________________________________
Additional Item Attachment:
File name: patch_bug63162_20221005.patch Size:16 KB
<https://file.savannah.gnu.org/file/patch_bug63162_20221005.patch?file_id=53797>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63162>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), John W. Eaton, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s),
Ken Marek <=
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Nicholas Jankowski, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), John W. Eaton, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), John W. Eaton, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), John W. Eaton, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Ken Marek, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), John W. Eaton, 2022/10/05
- [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s), Carlo de Falco, 2022/10/06