Celeritas 0.7-develop+ddcb429
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
celeritas::GeneratorStateBase Struct Referenceabstract

Manage counters for generation states. More...

#include <GeneratorInterface.hh>

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

Public Member Functions

virtual void sync_counters ()=0
 Update the host counters from the counters in the state's memory.
 
virtual void clear_generated ()=0
 Clear the generated count at the start of a transport loop.
 
virtual void reset_counters ()=0
 Discard pending work after an aborted loop, keeping accumulated counts.
 
- Public Member Functions inherited from celeritas::AuxStateInterface
virtual ~AuxStateInterface ()
 Default destructor.
 

Public Attributes

GeneratorCounters< size_type > counters
 Counts since the start of the optical loop (host copy)
 
GeneratorCounters< std::size_t > accum
 Counts accumulated over the event for diagnostics.
 

Additional Inherited Members

- Public Types inherited from celeritas::AuxStateInterface
using SPState = std::shared_ptr< AuxStateInterface >
 Default destructor.
 
- Protected Member Functions inherited from celeritas::AuxStateInterface
 AuxStateInterface ()=default
 
 AuxStateInterface (AuxStateInterface const &)=default
 Default destructor.
 
AuxStateInterface & operator= (AuxStateInterface const &)=default
 Default destructor.
 
 AuxStateInterface (AuxStateInterface &&)=default
 Default destructor.
 
AuxStateInterface & operator= (AuxStateInterface &&)=default
 Default destructor.
 

Detailed Description

Manage counters for generation states.

The accumulated counters record the total number of queued distributions (buffer_size), queued tracks (num_pending), and generated tracks (num_generated). A difference between the accumulated pending and generated counts indicates there were photons that were queued but never generated.

The counters are updated in the state's memory space during stepping, and sync_counters copies them back to counters and accum .

Member Function Documentation

◆ clear_generated()

virtual void celeritas::GeneratorStateBase::clear_generated ( )
pure virtual

Clear the generated count at the start of a transport loop.

Implemented in celeritas::optical::GeneratorCounterState< M >.

◆ reset_counters()

virtual void celeritas::GeneratorStateBase::reset_counters ( )
pure virtual

Discard pending work after an aborted loop, keeping accumulated counts.

Implemented in celeritas::optical::WlsGeneratorState< M >, and celeritas::optical::GeneratorCounterState< M >.

◆ sync_counters()

virtual void celeritas::GeneratorStateBase::sync_counters ( )
pure virtual

Update the host counters from the counters in the state's memory.

Implemented in celeritas::optical::GeneratorCounterState< M >.


The documentation for this struct was generated from the following file: