Celeritas
0.5.0-56+6b053cd
|
Access step-local (non-persistent) physics track data. More...
#include <PhysicsStepView.hh>
Public Types | |
Type aliases | |
using | PhysicsParamsRef = NativeCRef< PhysicsParamsData > |
using | PhysicsStateRef = NativeRef< PhysicsStateData > |
using | SecondaryAllocator = StackAllocator< Secondary > |
using | Energy = units::MevEnergy |
Public Member Functions | |
CELER_FUNCTION | PhysicsStepView (PhysicsParamsRef const ¶ms, PhysicsStateRef const &states, TrackSlotId tid) |
Construct from shared and state data. | |
CELER_FUNCTION void | macro_xs (real_type) |
Set the process-integrated total macroscopic cross section. | |
CELER_FUNCTION void | element (ElementComponentId) |
Set the sampled element. | |
CELER_FUNCTION void | msc_step (MscStep const &) |
Save MSC step limit data. | |
CELER_FUNCTION void | reset_energy_deposition () |
Reset the energy deposition to zero at the beginning of a step. | |
CELER_FUNCTION void | reset_energy_deposition_debug () |
Set the energy deposition to NaN for inactive tracks to catch errors. | |
CELER_FUNCTION void | deposit_energy (Energy) |
Accumulate into local step's energy deposition. | |
CELER_FUNCTION void | secondaries (Span< Secondary >) |
Set secondaries during an interaction, or clear them with an empty span. | |
CELER_FORCEINLINE_FUNCTION real_type | macro_xs () const |
Calculated process-integrated macroscopic XS. More... | |
CELER_FORCEINLINE_FUNCTION ElementComponentId | element () const |
Sampled element for discrete interaction. | |
CELER_FUNCTION MscStep & | msc_step () |
Mutable access to MSC step data (TODO: hack) | |
CELER_FUNCTION MscStep const & | msc_step () const |
Access calculated MSC step data. | |
CELER_FUNCTION Energy | energy_deposition () const |
Access accumulated energy deposition. | |
CELER_FUNCTION Span< Secondary const > | secondaries () const |
Access secondaries created by a discrete interaction. | |
CELER_FUNCTION real_type & | per_process_xs (ParticleProcessId) |
Access scratch space for particle-process cross section calculations. | |
CELER_FUNCTION real_type | per_process_xs (ParticleProcessId) const |
Access scratch space for particle-process cross section calculations. | |
CELER_FUNCTION SecondaryAllocator | make_secondary_allocator () const |
Return a secondary stack allocator view. | |
CELER_FUNCTION AtomicRelaxationHelper | make_relaxation_helper (ElementId el_id) const |
Make an atomic relaxation helper for the given element. | |
Access step-local (non-persistent) physics track data.
This class should be accessible to track slots that have inactive tracks so that the temporary values can be cleared. (Once we start partitioning track slots based on their status, this restriction might be lifted.) Unlike PhysicsTrackView
, this class shouldn't need any external info about the current particle type, material, etc.
The underlying physics data might be refactored later (and this class name might be changed) but it separates out some of the temporary data (interaction, macro xs, MSC step) from the persistent data (remaining MFP).
CELER_FUNCTION real_type celeritas::PhysicsStepView::macro_xs | ( | ) | const |
Calculated process-integrated macroscopic XS.
This value should be calculated in the pre-step kernel, and will be used to decrement interaction_mfp
and for sampling a process. Units are inverse length.