Skip to content
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

[WIP] Beam read_from_file also reads spin #1172

Open
wants to merge 12 commits into
base: development
Choose a base branch
from

Conversation

MaxThevenet
Copy link
Member

@MaxThevenet MaxThevenet commented Oct 7, 2024

As reported by @pots007, when reading a beam from file the spin data is currently ignored. This PR proposes to fix this. The behavior is determined by the user: if do_spin_tracking is specified, the corresponding runtime components are allocated and read from file. Otherwise, they are neither allocated nor read.

@MaxThevenet MaxThevenet changed the title [WIP] Beam read_from_file also reads beam [WIP] Beam read_from_file also reads spin Oct 7, 2024
@MaxThevenet MaxThevenet changed the title [WIP] Beam read_from_file also reads spin Beam read_from_file also reads spin Oct 7, 2024
MaxThevenet and others added 2 commits October 14, 2024 19:33
Co-authored-by: Alexander Sinn <64009254+AlexanderSinn@users.noreply.github.com>
@AlexanderSinn AlexanderSinn added the component: beam About the beam species label Oct 14, 2024
@MaxThevenet
Copy link
Member Author

Thanks for the review, some tests are on the way, I'll merge once we have confirmation that it works as expected.

@MaxThevenet MaxThevenet changed the title Beam read_from_file also reads spin [WIP] Beam read_from_file also reads spin Feb 14, 2025
MaxThevenet and others added 3 commits February 14, 2025 17:58
Co-authored-by: Alexander Sinn <64009254+AlexanderSinn@users.noreply.github.com>
@AlexanderSinn
Copy link
Member

Restart test
image

@MaxThevenet
Copy link
Member Author

Looks great! was this on GPU? If not, do you know why there is a tiny difference, don't we expect them to be equal to machine precision?

@AlexanderSinn
Copy link
Member

Unfortunately, there are tiny differences even on CPU. I added some oscillations in x to the witness so the spin has a signal. Without that, the spin is very constant, and both cases are within 1e-6, but with the autoscale plot the restart looks different. One possible reason for this could be that the momentum is multiplied with the speed of light and its inverse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: beam About the beam species
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants