Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::StepDiagnostic Class Referencefinal

Tally number of steps taken by 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 category () const final
 Category of data to write.
 
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
 CELER_DEFAULT_COPY_MOVE (ActionInterface)
 

Detailed Description

Tally number of steps taken by 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.

Member Function Documentation

◆ action_id()

ActionId celeritas::StepDiagnostic::action_id ( ) const
inlinefinalvirtual

ID of the action.

Implements celeritas::ActionInterface.

◆ category()

Category celeritas::StepDiagnostic::category ( ) const
inlinefinalvirtual

Category of data to write.

Implements celeritas::OutputInterface.

◆ description()

std::string_view celeritas::StepDiagnostic::description ( ) const
finalvirtual

Get a long description of the action.

Implements celeritas::ActionInterface.

◆ label()

std::string_view celeritas::StepDiagnostic::label ( ) const
inlinefinalvirtual

Short name for the action.

Implements celeritas::ActionInterface.

◆ order()

StepActionOrder celeritas::StepDiagnostic::order ( ) const
inlinefinalvirtual

Dependency ordering of the action.

Implements celeritas::StepActionInterface< P, S >.

◆ output()

void celeritas::StepDiagnostic::output ( JsonPimpl j) const
finalvirtual

Write output to the given JSON object.

Implements celeritas::OutputInterface.


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