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

DSMC: make the check of the number of processes more robust #5515

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

RemiLehe
Copy link
Member

@RemiLehe RemiLehe commented Dec 16, 2024

The previous code was brittle because it was not using AMREX_ALWAYS_ASSERT_WITH_MESSAGE (which indeed cannot be used inside a GPU kernel. In practice, a user could specify e.g. 10 scattering processes and not get an error.

The new code checks the number of processes before calling the GPU kernel, by using AMREX_ALWAYS_ASSERT_WITH_MESSAGE.

Copy link
Member

@roelof-groenewald roelof-groenewald left a comment

Choose a reason for hiding this comment

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

This looks good. I added one suggestion which you can accept if you agree, otherwise feel free to merge without it.

Source/Particles/Collision/BinaryCollision/DSMC/DSMCFunc.H Outdated Show resolved Hide resolved
@RemiLehe RemiLehe enabled auto-merge (squash) December 17, 2024 15:08
@RemiLehe RemiLehe merged commit 2cdcb77 into ECP-WarpX:development Dec 17, 2024
37 checks passed
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.

2 participants