ASCOT5
Loading...
Searching...
No Matches
Data Fields
particle_queue Struct Reference

Marker queue. More...

#include <particle.h>

Data Fields

int n
 
particle_state ** p
 
volatile int next
 
volatile int finished
 

Detailed Description

Marker queue.

Each time a marker has finished simulation, a new marker is chosen from this queue and the old marker's data is updated. Markers are never removed from the queue but an index is kept to mark where the next not yet simulated marker is found. Markers are represented by particle_state struct when they are stored in the queue.

Note: The queue can and is accessed by several threads, so make sure each access is thread-safe.

Definition at line 154 of file particle.h.

Field Documentation

◆ n

int particle_queue::n

Total number of markers in this queue

Definition at line 155 of file particle.h.

◆ p

particle_state** particle_queue::p

Pointer to an array storing pointers to all markers within this queue.

Definition at line 156 of file particle.h.

◆ next

volatile int particle_queue::next

Index where next unsimulated marker is found

Definition at line 158 of file particle.h.

◆ finished

volatile int particle_queue::finished

Number of markers who have finished simulation

Definition at line 159 of file particle.h.


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