Skip to content

TL: take into account linear and non-linear accuracy order - #24

Merged
tlunet merged 7 commits into
mainfrom
order
Oct 23, 2026
Merged

tlunet merged 7 commits into
mainfrom
order

Conversation

@tlunet

@tlunet tlunet commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Follow-up on #23 ...

Decision on :

  1. using the Ricatti test problem, since it's non-linear and non-autonomous, scalar (=> easy to solve with a simple Newton solver) and an analytical solution is available.
  2. allows 4 different expected orders : whether it uses the embedded weights or not, and whether it consider the linear order or not. One method has been added to the QGenerator class to retrieve those orders. Per default, linear order is the same as the corresponding order, except if the property is overridden.

Still TODO :

  • update developer documentation with the new orderLinear and orderLinearEmbedded properties
  • give credits to physverify when documenting the convergence tests

@tlunet tlunet changed the title TL: take into account linear and non-linear accuracy order following #23 TL: take into account linear and non-linear accuracy order following Oct 21, 2026
@tlunet
tlunet requested a review from brownbaerchen October 21, 2026 12:31
@codecov-commenter

codecov-commenter commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9e0b781) to head (4ca7c3a).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1590      1638   +48     
=========================================
+ Hits          1590      1638   +48     
Flag Coverage Δ
smart-tests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brownbaerchen brownbaerchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, thanks a lot!

Comment thread tests/test_qcoeff/test_convergence.py Outdated
Comment on lines +117 to +121
if useEmbeddedWeights:
try:
gen.weightsEmbedded
except NotImplementedError:
return None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we have any collocation methods with embedded weights?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We may have some in the future 🤩 ...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sure, but I am not a fan of handling the error like this, honestly. I think the error should be raised normally in the test rather than the test passing if you ask for embedded weights but there aren't any. The next best thing would be to use pytest.skip in the except statement.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fine ... I removed the try-except block for the collocation method, while still keeping the useEmbeddedWeight argument to remind us that this could be investigated one day (should not be hard to systematically create an embedded scheme for collocation scheme, tbh). Also, I switch to using pytest.skip in the common tests

@tlunet

tlunet commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

Looks good, thanks again @rcgiri-physics for opening this issue and experimenting with the linear and non-linear orders. I've integrated physverify in our CI tests so all Butcher coefficients are now tested against the supposed order conditions (will avoid typos like the one with RK53).

Tbh, you made physverify quite simple to use, your snippet was enough already to build the test. I had a look at the package overall, and I may give a few suggestions (just my own opinion, don't need to agree with me 😉) :

  1. you can add the documentation website as "website link" on your repo settings => add the link to the top right when landing on the github repo, avoid to scroll down to where it's given in the README (which is quite long, tbh 😅 ...)
  2. you should try adding coverage check to your repo, as we have in qmat => this is deterministic, quite easily setup nowadays, and ensure that every feature you have there is tested ("Only Pay for What You Need" principle)
  3. while I understood the idea behind you package (beside checking Butcher table), it took me some time to understand its other applications, and it's still not completely clear for what I can use it in practice and how. Maybe getting to more concise and "get to the point" documentation could help ? That will be our challenge of tomorrow with the new LLMs 😏
  4. careful of the one package that can do everything : it may lead to something very big that people won't install just to use one small feature in it (e.g check Butcher tables). Focusing on numerical solution of ODE/PDE is already a big chunk, I believe 😇

Anyway, that was very nice working with you. Don't hesitate to contact us if you want to collaborate further on time-integration schemes. We have many ideas on this topic (+ research software engineering) that may interest some students in your part of the world ...

@rcgiri-physics

Copy link
Copy Markdown

Thank you, @tlunet, for confirming the RK53 entry, and for sharing the papers, including Wang & Spiteri. I'll read them and try to understand linear order properly.

I'm still learning, so this discussion has taught me a lot, and thank you both for being so patient with me. I'm glad physverify may be useful for qmat's CI. Your feedback on how it works in practice would help me improve it for everyone. If I have more questions later, I hope it's okay to ask.

Thanks again, @tlunet and @brownbaerchen.

@tlunet tlunet changed the title TL: take into account linear and non-linear accuracy order following TL: take into account linear and non-linear accuracy order Oct 23, 2026
@tlunet
tlunet merged commit 2c66024 into main Oct 23, 2026
9 of 10 checks passed
@tlunet
tlunet deleted the order branch October 23, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Order labels of RK32, ARK343ERK and the ARK548L2SAESDIRK embedded scheme look one too high

4 participants