Celeritas 0.7.0-dev.245+develop.a7be925e
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::PhysicsStepView Class Reference

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

 PhysicsStepView (PhysicsParamsRef const &params, PhysicsStateRef const &states, TrackSlotId tid)
 Construct from shared and state data.
 
void macro_xs (real_type)
 Set the process-integrated total macroscopic cross section.
 
void element (ElementComponentId)
 Set the sampled element.
 
void msc_step (MscStep const &)
 Save MSC step limit data.
 
void reset_energy_deposition ()
 Reset the energy deposition to zero at the beginning of a step.
 
void reset_energy_deposition_debug ()
 Set the energy deposition to NaN for inactive tracks to catch errors.
 
void deposit_energy (Energy)
 Accumulate into local step's energy deposition.
 
void secondaries (Span< Secondary >)
 Set secondaries during an interaction, or clear them with an empty span.
 
real_type macro_xs () const
 Calculated process-integrated macroscopic XS.
 
ElementComponentId element () const
 Sampled element for discrete interaction.
 
MscStepmsc_step ()
 Mutable access to MSC step data (TODO: hack)
 
MscStep constmsc_step () const
 Access calculated MSC step data.
 
Energy energy_deposition () const
 Access accumulated energy deposition.
 
Span< Secondary constsecondaries () const
 Access secondaries created by a discrete interaction.
 
real_typeper_process_xs (ParticleProcessId)
 Access scratch space for particle-process cross section calculations.
 
real_type per_process_xs (ParticleProcessId) const
 Access scratch space for particle-process cross section calculations.
 
SecondaryAllocator make_secondary_allocator () const
 Return a secondary stack allocator view.
 
AtomicRelaxationHelper make_relaxation_helper (ElementId el_id) const
 Make an atomic relaxation helper for the given element.
 

Detailed Description

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).

Member Function Documentation

◆ macro_xs()

real_type celeritas::PhysicsStepView::macro_xs ( ) const
inline

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.


The documentation for this class was generated from the following file: