Repository navigation
Compute collocation nodes with symmetric eigensolvers - #4118
Open
Kiril1Shevtsov wants to merge 1 commit into
Open
Kiril1Shevtsov wants to merge 1 commit into
Kiril1Shevtsov wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Numerical instability in high-order Radau and Legendre collocation.
Summary/Motivation:
At higher collocation orders, computing Radau and Legendre nodes by finding polynomial roots in the monomial basis could produce complex-valued nodes due to numerical instability.
Since these collocation nodes should be real, this could prevent the transformation from working correctly at higher orders.
The patch replaces the unstable polynomial-root calculation with a symmetric eigenvalue problem and uses barycentric formulas to construct the collocation tables.
The existing API and dependencies remain unchanged.
Changes proposed in this PR:
Testing
A fresh validation run reported:
These results cover the tested configurations and do not guarantee numerical accuracy for arbitrary collocation orders.
AI-Use Disclosure
or
[] AI tools contributed to the development of this PR
Review process (select ONE):
Notes for reviewers (optional):
AI tools assisted with developing regression tests, reviewing the code for potential errors, checking test correctness, and identifying and correcting implementation issues.
ChatGPT (GPT-6) was also used to prepare the English PR description.
The numerical checks cover Radau and Legendre collocation nodes and tables, including higher-order cases. Feedback on numerical stability and the barycentric implementation would be appreciated.
Legal Acknowledgement
By contributing to this software project, I have read the [contribution guide](https://pyomo.readthedocs.io/en/stable/contribution_guide.html) and agree to the following terms and conditions for my contribution: