|
Celeritas 0.7-develop+ddcb429
|
Manage counters for generation states. More...
#include <GeneratorInterface.hh>

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. | |
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 .
Clear the generated count at the start of a transport loop.
Implemented in celeritas::optical::GeneratorCounterState< M >.
Discard pending work after an aborted loop, keeping accumulated counts.
Implemented in celeritas::optical::WlsGeneratorState< M >, and celeritas::optical::GeneratorCounterState< M >.
Update the host counters from the counters in the state's memory.
Implemented in celeritas::optical::GeneratorCounterState< M >.