added setting to control the maximum number of in flight particles. Also simplified enqueing procedure after XS lookup events to drop atomic usage there.

This commit is contained in:
John Tramm 2020-01-21 17:40:54 +00:00
parent 50d9cd22c9
commit c0a1056e55
5 changed files with 30 additions and 22 deletions

View file

@ -60,7 +60,6 @@ extern int64_t calculate_nonfuel_xs_queue_length;
extern int64_t advance_particle_queue_length;
extern int64_t surface_crossing_queue_length;
extern int64_t collision_queue_length;
extern int64_t max_particles_in_flight;
} // namespace simulation
@ -72,7 +71,7 @@ void init_event_queues(int64_t n_particles);
void free_event_queues(void);
void dispatch_xs_event(int64_t i);
void process_init_events(int64_t n_particles, int64_t source_offset);
void process_calculate_xs_events(QueueItem* queue, int64_t n);
void process_calculate_xs_events(QueueItem* queue, int64_t n_particles);
void process_advance_particle_events();
void process_surface_crossing_events();
void process_collision_events();

View file

@ -67,6 +67,8 @@ extern "C" int32_t n_inactive; //!< number of inactive batches
extern "C" int32_t gen_per_batch; //!< number of generations per batch
extern "C" int64_t n_particles; //!< number of particles per generation
extern "C" int64_t max_in_flight_particles; //!< Max num. event-based particles in flight
extern int electron_treatment; //!< how to treat secondary electrons
extern std::array<double, 4> energy_cutoff; //!< Energy cutoff in [eV] for each particle type
extern int legendre_to_tabular_points; //!< number of points to convert Legendres