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

[min-PR] QED module: use function provided by PICSAR to calculate gamma factor for photons #1928

Merged
merged 7 commits into from
May 5, 2021

Conversation

lucafedeli88
Copy link
Member

@lucafedeli88 lucafedeli88 commented May 3, 2021

Inside BreitWheelerEngineWrapper.H we need to calculate the gamma factor for photons to decide if their optical depth changes.
Indeed, if gamma < 2 the optical depth should not be evolved and pair generation should not take place (if pair production is called with gamma < 2, it leads to electrons and positrons having NaN as momentum components).
With this PR, gamma is calculated with a function provided by PICSAR. This ensures that the result is identical to what is calculated internally in PICSAR, preventing possible issues to due machine-precision errors.

@lucafedeli88 lucafedeli88 added the component: QED QED module label May 3, 2021
@lucafedeli88 lucafedeli88 requested a review from NeilZaim May 3, 2021 16:13
Copy link
Member

@NeilZaim NeilZaim left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

@EZoni
Copy link
Member

EZoni commented May 4, 2021

Note that the PICSAR commit changes you made here have just been merged independently in development through #1931 (May release).

@lucafedeli88
Copy link
Member Author

Note that the PICSAR commit changes you made here have just been merged independently in development through #1931 (May release).

Oh, I see! Anyway, I've just merged the development branch into my branch...

Copy link
Member

@EZoni EZoni left a comment

Choose a reason for hiding this comment

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

Thank you for this PR, looks good to me. I'll merge now.

@EZoni EZoni merged commit 57a2ac2 into ECP-WarpX:development May 5, 2021
@lucafedeli88 lucafedeli88 deleted the use_picsar_qed_for_gamma branch March 23, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: QED QED module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants