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
58 stars 32 forks source link

Fix gentrap orientation #1206

Closed sethrj closed 3 months ago

sethrj commented 3 months ago

This is a follow-on to #1205 and #1171. The calculation of the face normals assumed that the faces were oriented as CCW, whereas they were only asserted to be convex. I've fixed it by testing the orientation and reversing the order of the polygons if needed.