Celeritas 0.7-develop+a3e14d7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
celeritas::optical::WlsGeneratorState< M > Struct Template Referencefinal

Store optical WLS generation states in aux data. More...

#include <WavelengthShiftData.hh>

Inheritance diagram for celeritas::optical::WlsGeneratorState< M >:
Inheritance graph
[legend]

Public Member Functions

 WlsGeneratorState (StreamId stream, size_type capacity, size_type slots)
 Construct with stream, buffer capacity, and number of track slots.
 
void reset_counters () final
 Count and discard buffered distributions after an aborted loop.
 
void clear_buffer ()
 Mark all distributions in the buffer as invalid.
 
 operator bool () const
 True if states have been allocated.
 
- Public Member Functions inherited from celeritas::optical::GeneratorCounterState< M >
 GeneratorCounterState (StreamId stream)
 Construct with the stream used to update the counters.
 
StreamId stream_id () const
 Stream used to update the counters.
 
DevicePtr device_counters ()
 Counters in the state's memory space.
 
void assign (CountersT const &value)
 Set the current counters.
 
size_type buffer_bound ()
 Get a conservative upper bound on the current buffer size.
 
void grow_bound (size_type count)
 Increase the buffer bound by the maximum number of items added.
 
void copy_async ()
 Enqueue a copy of the counters used to tighten the buffer bound.
 
void sync_counters () override
 Synchronize and update the host counters and statistics.
 
void clear_generated () override
 Clear the generated count at the start of a transport loop.
 
- Public Member Functions inherited from celeritas::AuxStateInterface
virtual ~AuxStateInterface ()
 Default destructor.
 

Public Attributes

StateDataStore< WlsGeneratorStateData, M > store
 
size_type num_slots {}
 Number of track slots, which is the most distributions added per step.
 
- Public Attributes inherited from celeritas::GeneratorStateBase
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::optical::GeneratorCounterState< M >
using CountersT = GeneratorCounters< size_type >
 
using DevicePtr = ObserverPtr< GeneratorStateCounters, M >
 
- 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

template<MemSpace M>
struct celeritas::optical::WlsGeneratorState< M >

Store optical WLS generation states in aux data.

Member Function Documentation

◆ reset_counters()

template<MemSpace M>
void celeritas::optical::WlsGeneratorState< M >::reset_counters ( )
finalvirtual

Count and discard buffered distributions after an aborted loop.

WLS interactions update the core pending count immediately, but their distributions are normally accumulated at the next generation step. After counting them, the entire buffer is cleared so that the leftover distributions aren't generated in the next transport loop.

Reimplemented from celeritas::optical::GeneratorCounterState< M >.


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