|
Celeritas 0.7.0-dev.242+develop.62c3034b
|
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 | |
| MaterialTrackView (MaterialParamsRef const ¶ms, MaterialStateRef const &states, TrackSlotId tid) | |
| Construct from dynamic and static particle properties. | |
| MaterialTrackView & | operator= (Initializer_t const &other) |
| Initialize the particle. | |
| PhysMatId | material_id () const |
| Current material identifier. | |
| MaterialView | material_record () const |
| Get material properties for the current material. | |
| Span< real_type > | element_scratch () |
| Access scratch space with at least one real per element component. | |
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 caching 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.