apt-sim / AdePT

Accelerated demonstrator of electromagnetic Particle Transport
Apache License 2.0
25 stars 34 forks source link

Surface navigation now split in finding the frame and relocation #308

Closed agheata closed 4 days ago

agheata commented 1 week ago

The AdePT interfaces for navigation normally compute first the distance to the next hit volume, then relocates to find out the next path. The first interface for surface navigation did systematically step+relocation in one go, which is very inefficient in case of non-zero magnetic field, where the field propagator has to call the distance computation in several points along the trajectory.

The PR introduces the split: distance computation does not change the output state, but sets its boundary flag according to a surface being hit within the physics step, returning also the index of this surface. The relocation method used this index as input. Due to the addition of this index in the interfaces, currently, the calling interface of the surface navigator is for the moment different than the solid navigators.

phsft-bot commented 1 week ago

Can one of the admins verify this patch?