Merge pull request #1578 from shikhar413/lib_batches_setter

Python bindings for setting n_batches through C API
This commit is contained in:
Paul Romano 2020-06-11 11:30:53 -05:00 committed by GitHub
commit 2d048805c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 217 additions and 9 deletions

View file

@ -44,6 +44,7 @@ extern "C" {
int openmc_get_keff(double k_combined[]);
int openmc_get_material_index(int32_t id, int32_t* index);
int openmc_get_mesh_index(int32_t id, int32_t* index);
int openmc_get_n_batches(int* n_batches, bool get_max_batches);
int openmc_get_nuclide_index(const char name[], int* index);
int64_t openmc_get_seed();
int openmc_get_tally_index(int32_t id, int32_t* index);
@ -89,6 +90,8 @@ extern "C" {
int openmc_reset_timers();
int openmc_run();
void openmc_set_seed(int64_t new_seed);
int openmc_set_n_batches(int32_t n_batches, bool set_max_batches,
bool add_statepoint_batch);
int openmc_simulation_finalize();
int openmc_simulation_init();
int openmc_source_bank(void** ptr, int64_t* n);

View file

@ -64,7 +64,6 @@ extern std::string path_source_library; //!< path to the source shared object
extern std::string path_sourcepoint; //!< path to a source file
extern "C" std::string path_statepoint; //!< path to a statepoint file
extern "C" int32_t n_batches; //!< number of (inactive+active) batches
extern "C" int32_t n_inactive; //!< number of inactive batches
extern "C" int32_t max_lost_particles; //!< maximum number of lost particles
extern double rel_max_lost_particles; //!< maximum number of lost particles, relative to the total number of particles
@ -79,6 +78,7 @@ extern std::array<double, 4> energy_cutoff; //!< Energy cutoff in [eV] for each
extern int legendre_to_tabular_points; //!< number of points to convert Legendres
extern int max_order; //!< Maximum Legendre order for multigroup data
extern int n_log_bins; //!< number of bins for logarithmic energy grid
extern int n_batches; //!< number of (inactive+active) batches
extern int n_max_batches; //!< Maximum number of batches
extern ResScatMethod res_scat_method; //!< resonance upscattering method
extern double res_scat_energy_min; //!< Min energy in [eV] for res. upscattering