Since #1090 changed the beam id format in hipace, the first 2^24 beam particles have id=0 according to the amrex IDWrapper. This breaks the id = -id to make the particle invalid. This PR fixes this by using is_valid and make_valid functions that only look at the first bit of the id and are compatible with both formats.
[ ] Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
[ ] Tested (describe the tests in the PR description)
[ ] Runs on GPU (basic: the code compiles and run well with the new module)
[ ] Contains an automated test (checksum and/or comparison with theory)
[ ] Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
Since #1090 changed the beam id format in hipace, the first 2^24 beam particles have id=0 according to the amrex IDWrapper. This breaks the
id = -id
to make the particle invalid. This PR fixes this by usingis_valid
andmake_valid
functions that only look at the first bit of the id and are compatible with both formats.const
isconst
)