-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement cubic spline interpolation #1607
Open
amandalund
wants to merge
11
commits into
celeritas-project:develop
Choose a base branch
from
amandalund:cubic-spline
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
amandalund
added
enhancement
New feature or request
physics
Particles, processes, and stepping algorithms
labels
Feb 3, 2025
amandalund
force-pushed
the
cubic-spline
branch
3 times, most recently
from
February 3, 2025 02:41
5a454ba
to
4006b6e
Compare
Test summary 4 535 files 6 961 suites 15m 34s ⏱️ Results for commit b5fa9d4. ♻️ This comment has been updated with latest results. |
amandalund
force-pushed
the
cubic-spline
branch
from
February 3, 2025 02:55
4006b6e
to
dbe580d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This implements cubic spline interpolation, which is the default spline interpolation in Geant4. This was motivated by wanting to avoid updating a bunch of test results when we construct our own physics tables (#1544) and because it could eliminate the interpolation method as the reason for any discrepancies when doing physics comparisons.
There are options for using natural or not-a-knot boundary conditions: the latter is supposedly what's used by Geant4, but the second derivatives calculated using Geant4's code don't seem to match the expected values, so for now there's also a hack to optionally calculate the derivatives by exactly matching what Geant4 does.
Currently this is just hooked up in the
XsCalculator
, which is all that's needed for the range grid calculation, but it would be easy to support this in the non-uniform calculator and to optionally calculate the derivatives for the physics grids (so we can do some studies comparing all our interpolation methods). With this we can construct a range table that exactly matches the imported values.