celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/user/index.html
Other
63 stars 34 forks source link

Move unit enumeration to corecel and improve assertion flexibility #1197

Closed sethrj closed 6 months ago

sethrj commented 6 months ago

I'm extracting a few changes from #1194 that I added for the raytrace work (to improve feedback to the user). The Celeritas unit system enum now lives in corecel/Types, so that it can be used by geocel. I also refactored the runtime assertion errors for readability, and I've changed "not configured" and "not implemented" to runtime errors, since we might want to let users encounter those naturally rather than adding additional validation checks. (For example, it's easier to let the code hit a NOT_CONFIGURED("Vecgeom") then have that as a debug check and do an additional validation on the user input.)

sethrj commented 6 months ago

@amandalund This should be pretty quick: and I think @elliottbiondo and @mrguilima gave most of it a look-through in the other PR.