princemahajan / FLINT

Fortran Library for numerical INTegration of differential equations
https://princemahajan.github.io/FLINT/
Apache License 2.0
43 stars 9 forks source link

Dense Output Accuracy for DOP853 is not 7th order #14

Closed PunchesMalone closed 10 months ago

PunchesMalone commented 1 year ago

Hello,

Thanks for writing this package. When attempting to use the DOP853 integrator in dense mode to integrate a Gateway reference orbit in the CR3BP, the dense output does not achieve accuracy better than approx 1.e-6 in terms of the Jacobi constant variation, no matter how high I set the rtol/atol values. When comparing against the SciPy DOP853 implementation, the performance is markedly better, with Jacobi Constant error roughly tracking the rtol setting (see attached figure). I attempted to find the bug myself but I was unsuccessful.

Figure_2

princemahajan commented 1 year ago

Thanks for submitting this potential issue. Is it possible for you to provide a sample code for reproduction?

PunchesMalone commented 1 year ago

Sure, give me a bit to put together some minimum working code.

David

On Fri, Nov 18, 2022 at 08:24 Bharat Mahajan @.***> wrote:

Thanks for submitting this potential issue. Is it possible for you to provide a sample code for reproduction?

— Reply to this email directly, view it on GitHub https://github.com/princemahajan/FLINT/issues/14#issuecomment-1320063199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGSICMPTFVDKHIT7UE272LWI6GSVANCNFSM6AAAAAASEQKN3Q . You are receiving this because you authored the thread.Message ID: @.***>

--

PunchesMalone commented 1 year ago

Hello,

Here's a minimum working example, you can just unzip and compile with the current version of FLINT linked. . . The .py file will make a plot for you.

David

mwe.zip

princemahajan commented 1 year ago

thanks for submitting your code. Will look into it.

princemahajan commented 10 months ago

This issue is fixed. A relatively recent unnecessary code change I did, messed up the interpolation coefficient computation. See the latest WP test codes.