Celeritas  0.5.0-86+4a8eea4
Classes | Typedefs | Enumerations | Functions
celeritas::optical Namespace Reference

Physics classes used inside the optical physics loop. More...

Classes

class  CoreState
 Store all state data for a single thread. More...
 
class  ActionLauncher
 Profile and launch optical stepping loop kernels. More...
 
class  AlongStepAction
 Move a track to the next boundary or interaction. More...
 
class  BoundaryAction
 Move a track across a boundary. More...
 
class  InitializeTracksAction
 Initialize optical track states. More...
 
class  LocateVacanciesAction
 Find the vacant track slots at the end of the step. More...
 
class  PreStepAction
 Set up the beginning of a physics step. More...
 
class  TrackingCutAction
 Kill misbehaving photons and deposit energy locally. More...
 
class  TrackSlotExecutor
 Transform a thread or track slot ID into a core track view. More...
 
class  ConditionalTrackSlotExecutor
 Launch the track only when a certain condition applies to the sim state. More...
 
struct  CherenkovData
 Cherenkov angle integrals tablulated as a function of photon energy. More...
 
class  CherenkovDndxCalculator
 Calculate the mean number of Cherenkov photons produced per unit length. More...
 
class  CherenkovGenerator
 Sample Cherenkov photons from the given distribution. More...
 
class  CherenkovParams
 Build and manage Cherenkov data. More...
 
class  CoreParams
 Shared parameters for the optical photon loop. More...
 
class  CoreStateInterface
 Interface class for optical state data. More...
 
struct  PhysicsParamsData
 
struct  PhysicsStateData
 
struct  CoreScalars
 Memspace-independent core variables. More...
 
struct  CoreParamsData
 Immutable problem data. More...
 
struct  CoreStateData
 Thread-local state data. More...
 
class  CoreTrackView
 Access all core properties of a physics track. More...
 
struct  GeneratorStepData
 Pre- and post-step data for sampling optical photons. More...
 
struct  GeneratorDistributionData
 Input data for sampling optical photons. More...
 
class  ImportedModels
 A collection of imported optical models. More...
 
class  ImportedModelAdapter
 An adapter for imported model data corresponding to a specific identifier. More...
 
struct  Interaction
 The result of a discrete optical interaction. More...
 
class  AbsorptionInteractor
 Sample optical absorption interaction. More...
 
class  RayleighInteractor
 Sample optical Rayleigh scattering. More...
 
class  WavelengthShiftInteractor
 Apply the wavelength shift (WLS) to optical photons. More...
 
struct  MaterialParamsData
 Shared optical material properties. More...
 
class  MaterialParams
 Manage properties for optical materials. More...
 
class  MaterialView
 Access optical material properties. More...
 
class  MfpBuilder
 Helper class for optical models to build MFP tables. More...
 
class  AbsorptionModel
 Set up and launch the optical absorption model interaction. More...
 
class  RayleighMfpCalculator
 Calculate the Rayleigh MFP for a given set of material properties. More...
 
class  RayleighModel
 Set up and launch the optical Rayleigh scattering model interaction. More...
 
class  Model
 Base class for discrete, volumetric optical models. More...
 
struct  ParticleStateData
 Storage for dynamic particle data. More...
 
class  ParticleTrackView
 Properties of a single optical photon. More...
 
struct  ScintRecord
 Parameterized scintillation properties. More...
 
struct  MatScintSpectrumRecord
 Material-dependent scintillation spectrum. More...
 
struct  ParScintSpectrumRecord
 Particle- and material-dependent scintillation spectrum. More...
 
struct  ScintillationData
 Data characterizing the scintillation spectrum for all particles and materials. More...
 
class  ScintillationGenerator
 Sample scintillation photons from optical property data and step data. More...
 
class  ScintillationParams
 Build and manage scintillation data. More...
 
struct  SimStateData
 Storage for dynamic simulation data. More...
 
class  SimTrackView
 Simulation properties for a single track. More...
 
struct  TrackInitParamsData
 Persistent data for optical track initialization. More...
 
struct  TrackInitStateData
 Storage for dynamic data used to initialize new optical photon tracks. More...
 
struct  TrackInitializer
 Optical photon data used to initialize a photon track state. More...
 
class  TrackInitParams
 Manage persistent track initializer data. More...
 
struct  WlsMaterialRecord
 Material dependent scalar property of wavelength shift (WLS). More...
 
struct  WavelengthShiftData
 Wavelength shift data. More...
 
class  WavelengthShiftParams
 Build and manage wavelength shift (WLS) data. More...
 

Typedefs

using OpticalBeginRunActionInterface = BeginRunActionInterface< CoreParams, CoreState >
 Interface called at beginning of the core stepping loop.
 
using OpticalStepActionInterface = StepActionInterface< CoreParams, CoreState >
 Action interface for core stepping loop.
 
template<MemSpace M>
using CoreParamsPtr = CRefPtr< CoreParamsData, M >
 
template<MemSpace M>
using CoreStatePtr = RefPtr< CoreStateData, M >
 

Enumerations

enum class  ImportModelClass { absorption , rayleigh , wls , size_ }
 Enumerator for available optical physics models. More...
 

Functions

char const * to_cstring (ImportModelClass imc)
 
template<class F >
void launch_action (CoreState< MemSpace::host > &state, F &&execute_thread)
 Helper function to run an action in parallel on CPU over all states. More...
 
template<class T >
CELER_FUNCTION TrackSlotExecutor (CoreParamsPtr< MemSpace::native >, CoreStatePtr< MemSpace::native >, T &&) -> TrackSlotExecutor< T >
 
template<class C , class T >
CELER_FUNCTION ConditionalTrackSlotExecutor (CoreParamsPtr< MemSpace::native >, CoreStatePtr< MemSpace::native >, C &&, T &&) -> ConditionalTrackSlotExecutor< C, T >
 
template<class T >
decltype(auto) CELER_FUNCTION make_active_thread_executor (CoreParamsPtr< MemSpace::native > params, CoreStatePtr< MemSpace::native > const &state, T &&apply_track)
 Return a track executor that only applies to active, non-errored tracks.
 
template<class T >
decltype(auto) CELER_FUNCTION make_action_thread_executor (CoreParamsPtr< MemSpace::native > params, CoreStatePtr< MemSpace::native > state, ActionId action, T &&apply_track)
 Return a track executor that only applies if the action ID matches. More...
 
template<MemSpace M>
void resize (CoreStateData< Ownership::value, M > *state, HostCRef< CoreParamsData > const &params, StreamId stream_id, size_type size)
 Resize states in host code. More...
 
template void resize< MemSpace::host > (CoreStateData< Ownership::value, MemSpace::host > *, HostCRef< CoreParamsData > const &, StreamId, size_type)
 
template void resize< MemSpace::device > (CoreStateData< Ownership::value, MemSpace::device > *, HostCRef< CoreParamsData > const &, StreamId, size_type)
 
template<MemSpace M>
void resize (PhysicsStateData< Ownership::value, M > *, HostCRef< PhysicsParamsData > const &, size_type)
 
::celeritas::MaterialId get_core_material (::celeritas::MaterialParams const &params, OpticalMaterialId opt_mat)
 Search for material ID corresponding to the given optical material ID. More...
 
template<MemSpace M>
void resize (ParticleStateData< Ownership::value, M > *data, size_type size)
 Resize particle states.
 
template<MemSpace M>
void resize (SimStateData< Ownership::value, M > *data, size_type size)
 Resize simulation states and set alive to be false.
 
template<MemSpace M>
void resize (TrackInitStateData< Ownership::value, M > *data, HostCRef< TrackInitParamsData > const &params, StreamId stream, size_type size)
 Resize and initialize data. More...
 

Detailed Description

Physics classes used inside the optical physics loop.

Interface classes that integrate with the main Celeritas stepping loop are in the main namespace.

Enumeration Type Documentation

◆ ImportModelClass

Enumerator for available optical physics models.

This enum is used to identify the optical model that imported model MFP tables correspond to.

Function Documentation

◆ get_core_material()

::celeritas::MaterialId celeritas::optical::get_core_material ( ::celeritas::MaterialParams const &  params,
OpticalMaterialId  opt_mat 
)

Search for material ID corresponding to the given optical material ID.

Assumes material ID to optical material ID mapping is one-to-one.

◆ launch_action()

template<class F >
void celeritas::optical::launch_action ( CoreState< MemSpace::host > &  state,
F &&  execute_thread 
)

Helper function to run an action in parallel on CPU over all states.

Example:

void FooAction::step(CoreParams const& params,
CoreStateHost& state) const
{
launch_action(state, make_blah_executor(params, state, blah));
}
void launch_action(CoreState< MemSpace::host > &state, F &&execute_thread)
Helper function to run an action in parallel on CPU over all states.
Definition: optical/action/ActionLauncher.hh:38

◆ make_action_thread_executor()

template<class T >
decltype(auto) CELER_FUNCTION celeritas::optical::make_action_thread_executor ( CoreParamsPtr< MemSpace::native params,
CoreStatePtr< MemSpace::native state,
ActionId  action,
T &&  apply_track 
)
inline

Return a track executor that only applies if the action ID matches.

Note
This should generally only be used for post-step actions and other cases where the IDs explicitly are set. Many explicit actions apply to all threads, active or not.

◆ resize() [1/2]

template<MemSpace M>
void celeritas::optical::resize ( CoreStateData< Ownership::value, M > *  state,
HostCRef< CoreParamsData > const &  params,
StreamId  stream_id,
size_type  size 
)

Resize states in host code.

Initialize threads to track slots mapping. Resize core states using parameter data, stream ID, and track slots.

◆ resize() [2/2]

template<MemSpace M>
void celeritas::optical::resize ( TrackInitStateData< Ownership::value, M > *  data,
HostCRef< TrackInitParamsData > const &  params,
StreamId  stream,
size_type  size 
)

Resize and initialize data.

Here size is the number of track states, and the "capacity" is the maximum number of initializers that can be buffered.