Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::MaterialTrackView Class Reference

Read/write view to the material properties of a single particle track. More...

#include <MaterialTrackView.hh>

Public Types

Type aliases
using Initializer_t = MaterialTrackState
 
using MaterialParamsRef = NativeCRef< MaterialParamsData >
 
using MaterialStateRef = NativeRef< MaterialStateData >
 

Public Member Functions

CELER_FUNCTION MaterialTrackView (MaterialParamsRef const &params, MaterialStateRef const &states, TrackSlotId tid)
 Construct from dynamic and static particle properties.
 
CELER_FUNCTION MaterialTrackViewoperator= (Initializer_t const &other)
 Initialize the particle.
 
CELER_FORCEINLINE_FUNCTION MaterialId material_id () const
 Current material identifier.
 
CELER_FORCEINLINE_FUNCTION MaterialView make_material_view () const
 Get material properties for the current material.
 
CELER_FUNCTION Span< real_typeelement_scratch ()
 Access scratch space with at least one real per element component.
 

Detailed Description

Read/write view to the material properties of a single particle track.

These functions should be used in each physics Process or Interactor or anything else that needs to access particle properties. Assume that all these functions are expensive: when using them as accessors, locally store the results rather than calling the function repeatedly. If any of the calculations prove to be hot spots we will experiment with cacheing some of the variables.

The element scratch space is "thread-private" data with a fixed size greater than or equal to the number of elemental components in the current material.


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