Skip to content

Document the adaptive integrators' largest step and tolerances - #1679

Merged
schaubh merged 1 commit into
AVSLab:developfrom
Noah-Parsons:docs-adaptive-integrator-step
Nov 15, 2026
Merged

schaubh merged 1 commit into
AVSLab:developfrom
Noah-Parsons:docs-adaptive-integrator-step

Conversation

@Noah-Parsons

Copy link
Copy Markdown
Contributor

Description

Adds a "Step Size and Tolerances" section to the RKF78 and RKF45 integrator pages. It explains that each task update starts with a step equal to the task period and never takes a longer one, so the task period is the largest step and the tolerances govern accuracy only below it, and that at the default relTol of 1e-4 a full task period can be accepted through the periapsis of a highly eccentric orbit without the error being reported. The RKF78 page includes measured errors for an e = 0.95 orbit at two task periods and three tolerance settings. A release-note snippet is added.

Verification

Documentation only; no code or tests change. The behaviour described matches svIntegratorAdaptiveRungeKutta.h on develop (the first trial step is the whole task period, and later steps are capped at the time remaining in it). The table was measured with Basilisk 2.12.2 against a 40-digit solution of Kepler's equation computed independently of Basilisk, using Basilisk's own value of Earth's GM. The new sections parse as valid reStructuredText.

Documentation

svIntegratorRKF78.rst and svIntegratorRKF45.rst.

Future work

None planned.

@Noah-Parsons
Noah-Parsons requested a review from a team as a code owner November 13, 2026 22:14
@schaubh schaubh self-assigned this Nov 14, 2026
@schaubh schaubh added the documentation Improvements or additions to documentation label Nov 14, 2026
@schaubh schaubh added this to Basilisk Nov 14, 2026

@schaubh schaubh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this documentation improvement. I like making this explicit for the two variable time step RK integrators we provide.

The long explanation for the RK78 is too much. Such a longer discussion would make more sense in an example script, say scenarioVariableTimeStepIntegrators.py?

@Noah-Parsons

Copy link
Copy Markdown
Contributor Author

Thank you for the review. I agree the detailed discussion is better suited to an example than to the documentation page, so I have replaced it and the table with a short explanation that the task rate sets the largest step, followed by a warning that the default tolerances may not suit all orbit regimes and should be set appropriately. The same change is made on the RKF45 page, and the release note is shortened to match.

On your question about integration errors being reported: the sentence was meant to say that the integrator accepts the full step without any indication, not that it should report an error. With that paragraph removed, the point no longer arises.

If it would be useful, I would be glad to open a follow-up pull request adding scenarioVariableTimeStepIntegrators.py, demonstrating the effect of the tolerances and task rate on a circular and an eccentric orbit.

@Noah-Parsons
Noah-Parsons requested a review from schaubh November 14, 2026 17:43

@schaubh schaubh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor thing. If you could please squash the 2nd commit with the first to yield a clean branch, then we are ready to merge this PR>

@Noah-Parsons
Noah-Parsons force-pushed the docs-adaptive-integrator-step branch from b934201 to 75b514f Compare November 14, 2026 23:26
@Noah-Parsons

Copy link
Copy Markdown
Contributor Author

Thank you. The two commits are now squashed into one, and the branch has been force-pushed.

@schaubh
schaubh merged commit e5eddcb into AVSLab:develop Nov 15, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this to ✅ Done in Basilisk Nov 15, 2026
@Noah-Parsons
Noah-Parsons deleted the docs-adaptive-integrator-step branch November 15, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

RKF45/RKF78 docs: the task period is the largest step; the default relTol can give large errors on eccentric orbits

2 participants