Celeritas  0.5.0-56+6b053cd
Classes | Typedefs | Enumerations | Functions
celeritas/Types.hh File Reference

Type definitions for simulation management. More...

#include <cstdint>
#include "corecel/Config.hh"
#include "corecel/Assert.hh"
#include "corecel/Macros.hh"
#include "corecel/OpaqueId.hh"
#include "corecel/Types.hh"
#include "corecel/sys/ThreadId.hh"
#include "geocel/Types.hh"

Classes

struct  celeritas::StepLimit
 Step length and limiting action to take. More...
 

Typedefs

using celeritas::ElementId = OpaqueId< struct ElementRecord >
 Opaque index to ElementRecord in the global vector of elements.
 
using celeritas::EventId = OpaqueId< struct Event_ >
 Zero-indexed counter for the initiating event for a track.
 
using celeritas::UniqueEventId = OpaqueId< struct Event_, std::uint64_t >
 Unique identifier for an event used by external applications.
 
using celeritas::IsotopeId = OpaqueId< struct IsotopeRecord >
 Opaque index to IsotopeRecord in a vector.
 
using celeritas::MaterialId = OpaqueId< class Material_ >
 Opaque index of a material modified by physics options.
 
using celeritas::ModelId = OpaqueId< class Model >
 Opaque index of model in the list of physics processes.
 
using celeritas::OpticalMaterialId = OpaqueId< struct OpticalMaterial_ >
 Opaque index to a material with optical properties.
 
using celeritas::ParticleId = OpaqueId< struct Particle_ >
 Opaque index to ParticleRecord in a vector: represents a particle type.
 
using celeritas::ProcessId = OpaqueId< class Process >
 Opaque index of physics process.
 
using celeritas::TrackId = OpaqueId< struct Track_ >
 Unique ID (for an event) of a track among all primaries and secondaries.
 
using celeritas::DetectorId = OpaqueId< struct Detector_ >
 Opaque index for mapping volume-specific "sensitive detector" objects.
 
using celeritas::ElementComponentId = OpaqueId< struct MatElementComponent >
 Opaque index to one elemental component datum in a particular material.
 
using celeritas::IsotopeComponentId = OpaqueId< struct ElIsotopeComponent >
 Opaque index to one isotopic component datum in a particular element.
 
using celeritas::ParticleProcessId = OpaqueId< ProcessId >
 Opaque index of a process applicable to a single particle type.
 
using celeritas::ParticleModelId = OpaqueId< ModelId >
 Opaque index of a model applicable to a single particle type.
 
using celeritas::SubshellId = OpaqueId< struct Subshell_ >
 Opaque index of electron subshell.
 
using celeritas::ChannelId = OpaqueId< struct Channel_ >
 Opaque index of particle-nucleon cascade channel.
 

Enumerations

enum class  celeritas::MatterState {
  unspecified = 0 , solid , liquid , gas ,
  size_
}
 Physical state of matter.
 
enum class  celeritas::TrackStatus : std::uint_least8_t {
  inactive = 0 , initializing , alive , begin_dying_ ,
  errored = begin_dying_ , killed , size_
}
 Whether a track slot is alive, inactive, or dying inside a step iteration. More...
 
enum class  celeritas::StepPoint { pre , post , size_ }
 Differentiate between result data at the beginning and end of a step.
 
enum class  celeritas::TrackOrder {
  none , begin_layout_ , init_charge = begin_layout_ , end_layout_ ,
  begin_reindex_ = end_layout_ , reindex_shuffle = begin_reindex_ , reindex_status , reindex_particle_type ,
  begin_reindex_action_ , reindex_along_step_action = begin_reindex_action_ , reindex_step_limit_action , reindex_both_action ,
  end_reindex_action_ , end_reindex_ = end_reindex_action_ , size_ = end_reindex_
}
 Change the ordering or thread mapping of track slots. More...
 
enum class  celeritas::MscStepLimitAlgorithm {
  minimal , safety , safety_plus , distance_to_boundary ,
  size_
}
 Algorithm used to calculate the multiple scattering step limit.
 
enum class  celeritas::NuclearFormFactorType {
  none , flat , exponential , gaussian ,
  size_
}
 Nuclear form factor model for Coulomb scattering.
 

Functions

CELER_CONSTEXPR_FUNCTION bool celeritas::is_track_valid (TrackStatus status)
 Whether a track is in a consistent, valid state.
 
char const * celeritas::to_cstring (Interp value)
 Get a string corresponding to an interpolation.
 
char const * celeritas::to_cstring (MatterState value)
 Get a string corresponding to a state of matter.
 
char const * celeritas::to_cstring (TrackStatus value)
 Get a string corresponding to a track status.
 
char const * celeritas::to_cstring (TrackOrder value)
 Get a string corresponding to a track ordering policy.
 
char const * celeritas::to_cstring (MscStepLimitAlgorithm value)
 Get a string corresponding to the MSC step limit algorithm.
 
char const * celeritas::to_cstring (NuclearFormFactorType value)
 Get a string corresponding to the nuclear form factor model.
 

Detailed Description

Type definitions for simulation management.

Enumeration Type Documentation

◆ TrackOrder

enum celeritas::TrackOrder
strong

Change the ordering or thread mapping of track slots.

There are three categories of track sorting:

  1. No sorting is performed and new tracks are inserted in the nearest empty track slot. (none )
  2. The location of new track slots is biased during track initialization: charged and neutral tracks are inserted at opposite sides of the track slot vacancies. (init_charge )
  3. Tracks are reindexed one or more times per step so that the layout in memory is unchanged but an additional indirection maps threads onto different track slots based on particle attributes (reindex_status, reindex_particle_type ), actions (reindex_along_step_action, reindex_step_limit_action, reindex_both_action ).
  4. As a control to measure the cost of indirection, the track slots can be reindexed randomly at the beginning of execution (reindex_shuffle ).
Enumerator
none 

Don't do any sorting: tracks are in an arbitrary order.

init_charge 

Partition data layout of new tracks by charged vs neutral.

begin_reindex_ 

Shuffle at the start of the simulation.

reindex_status 

Partition by active/inactive status.

reindex_particle_type 

Sort by particle type.

reindex_along_step_action 

Sort only by the along-step action id.

reindex_step_limit_action 

Sort only by the step limit action id.

reindex_both_action 

Sort by along-step id, then post-step ID.

◆ TrackStatus

enum celeritas::TrackStatus : std::uint_least8_t
strong

Whether a track slot is alive, inactive, or dying inside a step iteration.

Each track slot has a state marking its transition between death and life.

  • A track slot starts as inactive . If not filled with a new track, it is inactive for the rest of the step iteration.
  • When it is populated with a new particle, it is initializing . If an error occurs during initialization it is errored .
  • During the pre-step setup, a non-errored active track slot is marked as alive .
  • During along-step or post-step a track can be marked as errored or killed .
Enumerator
inactive 

No tracking in this thread slot.

initializing 

Before pre-step, after initialization.

alive 

Track is active and alive.

errored 

Track failed during this step.

killed 

Killed physically inside the step.