Skip to content

Fix/user grid - #420

Open
whaeck wants to merge 3 commits into
developfrom
fix/user-grid
Open

whaeck wants to merge 3 commits into
developfrom
fix/user-grid

Conversation

@whaeck

@whaeck whaeck commented Oct 19, 2026

Copy link
Copy Markdown
Member

When generating the initial grid used for linearisation in RECONR, NJOY2016 uses a strategy in which it adds grid points based on the resonance energies and resonance widths. In addition to those points, it will also include user defined grid points and boundaries for resonance ranges (if resonances are present). These boundary points are split into 2 points by nudging the boundary point up and down so that a discontinuity is created.

NJOY2016 seems to always drop the last value of that grid, either the highest user defined point or the second point in the discontinuity of the last resonance boundary. Another issue found was that the user defined grid points were assumed to be sorted which could lead to some weirdness when they were not (only when there were no resonance parameters present).

This merge request fixes these issues and corrects the sorting function as well to fix a few edge cases (e.g. sorting was skipped if 2 or less values had to be sorted, even if they were not sorted, etc.)

Tests were updated since we now have the second point in the discontinuity appear in the test files.

This branch has not been deployed

No deployments
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.

1 participant