Celeritas  0.5.0-86+4a8eea4
Public Member Functions | Static Public Member Functions | List of all members
celeritas::StepDiagnostic Class Referencefinal

Tally post-step actions for each particle type. More...

#include <StepDiagnostic.hh>

Inheritance diagram for celeritas::StepDiagnostic:
Inheritance graph
[legend]

Public Types

Type aliases
using SPConstParticle = std::shared_ptr< ParticleParams const >
 
using VecVecCount = std::vector< std::vector< size_type > >
 
- Public Types inherited from celeritas::ActionTypeTraits< P, S >
using CoreParams = P
 
using CoreStateHost = S< MemSpace::host >
 
using CoreStateDevice = S< MemSpace::device >
 
using SpanCoreStateHost = Span< S< MemSpace::host > *const >
 
using SpanCoreStateDevice = Span< S< MemSpace::device > *const >
 
- Public Types inherited from celeritas::OutputInterface
enum class  Category {
  input , result , system , internal ,
  size_
}
 Output category (TODO: could replace with string/cstring?)
 

Public Member Functions

 StepDiagnostic (ActionId id, SPConstParticle particle, size_type max_bins, size_type num_streams)
 Construct with particle data.
 
 ~StepDiagnostic () final
 Default destructor.
 
VecVecCount calc_steps () const
 Get the diagnostic results accumulated over all streams.
 
size_type state_size () const
 Size of diagnostic state data (number of bins times number of particles)
 
void clear ()
 Reset diagnostic results.
 
ExplicitAction interface
void step (CoreParams const &, CoreStateHost &) const final
 Execute action with host data.
 
void step (CoreParams const &, CoreStateDevice &) const final
 Execute action with device data.
 
ActionId action_id () const final
 ID of the action.
 
std::string_view label () const final
 Short name for the action.
 
std::string_view description () const final
 Get a long description of the action.
 
StepActionOrder order () const final
 Dependency ordering of the action.
 
Output interface

Category of data to write

Category category () const final
 Write output to the given JSON object.
 
void output (JsonPimpl *) const final
 Write output to the given JSON object.
 
- Public Member Functions inherited from celeritas::StepActionInterface< P, S >
virtual void step (P const &, S< MemSpace::host > &) const =0
 Execute the action with host data.
 
virtual void step (P const &, S< MemSpace::device > &) const =0
 Execute the action with device data.
 
- Public Member Functions inherited from celeritas::ActionInterface
virtual ~ActionInterface () noexcept=0
 Default destructor.
 

Static Public Member Functions

static std::shared_ptr< StepDiagnosticmake_and_insert (CoreParams const &core, size_type max_bins)
 Construct and add to core params.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ActionInterface
 ActionInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (ActionInterface)
 

Detailed Description

Tally post-step actions for each particle type.

This adds an step-diagnostic entry to the result category of the main Celeritas output that bins the total number of steps taken by a track, grouped by particle type. The result is an integral over all events.


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