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

@ -266,6 +266,15 @@ Functions
:return: Return status (negative if an error occurs)
:rtype: int
.. c:function:: int openmc_get_n_batches(int* n_batches, bool get_max_batches)
Get number of batches to simulate
:param int* n_batches: Number of batches to simulate
:param bool get_max_batches: Whether to return `n_batches` or `n_max_batches` (only relevant when triggers are used)
:return: Return status (negative if an error occurred)
:rtype: int
.. c:function:: int openmc_get_nuclide_index(const char name[], int* index)
Get the index in the nuclides array for a nuclide with a given name
@ -452,6 +461,16 @@ Functions
:return: Return status (negative if an error occurs)
:rtype: int
.. c:function:: int openmc_set_n_batches(int32_t n_batches, bool set_max_batches, bool add_statepoint_batch)
Set number of batches and number of max batches
:param int32_t n_batches: Number of batches to simulate
:param bool set_max_batches: Whether to set `settings::n_max_batches` or `settings::n_batches` (only relevant when triggers are used)
:param bool add_statepoint_batch: Whether to add `n_batches` to `settings::statepoint_batch`
:return: Return status (negative if an error occurred)
:rtype: int
.. c:function:: int openmc_simulation_finalize()
Finalize a simulation.