crossingsCounter
template<typename Layer, size_t I> class crossingsCounter
Counts threshold crossings for a specific state variable in a layer.
-
Layer - Layer type exposing state_tuple_type.
-
I - Index of the state variable to monitor.
Functions
| Name | Description |
|---|---|
| crossingsCounter | Constructor for the crossingsCounter. |
| count | Performs the crossing count for the current step. |
| reset | Resets the crossing counts to zero. |
| destroy | Cleans up device memory. |
Function Details
count
void count(int step)
Performs the crossing count for the current step.
-
step - The current simulation step number.
crossingsCounter
crossingsCounter(Layer& layer, state_value_type threshold, CounterBehavior behavior = CounterBehavior::BELOW_THR)
Constructor for the crossingsCounter.
-
layer - The reference to the simulation layer.
-
threshold - The value a state must cross to be counted.
-
behavior - The type of crossing to count (BELOW_THR, ABOVE_THR, BIDIRECTIONAL).
destroy
void destroy()
Cleans up device memory.
reset
void reset()
Resets the crossing counts to zero.