mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Move number of batches, generations, particles to settings.h
This commit is contained in:
parent
13341ba59b
commit
d1cc9fd9c6
11 changed files with 43 additions and 31 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "openmc/capi.h"
|
||||
#include "openmc/message_passing.h"
|
||||
#include "openmc/settings.h"
|
||||
|
||||
// OPENMC_RUN encompasses all the main logic where iterations are performed
|
||||
// over the batches, generations, and histories in a fixed source or k-eigenvalue
|
||||
|
|
@ -41,10 +42,10 @@ void openmc_simulation_init_c()
|
|||
void calculate_work()
|
||||
{
|
||||
// Determine minimum amount of particles to simulate on each processor
|
||||
int64_t min_work = n_particles/mpi::n_procs;
|
||||
int64_t min_work = settings::n_particles / mpi::n_procs;
|
||||
|
||||
// Determine number of processors that have one extra particle
|
||||
int64_t remainder = n_particles % mpi::n_procs;
|
||||
int64_t remainder = settings::n_particles % mpi::n_procs;
|
||||
|
||||
int64_t i_bank = 0;
|
||||
work_index.reserve(mpi::n_procs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue