Move openmc_run to C++ side

This commit is contained in:
Paul Romano 2018-04-12 07:45:47 -05:00
parent 14455dc43e
commit faf35d21bc
4 changed files with 20 additions and 24 deletions

18
src/simulation.cpp Normal file
View file

@ -0,0 +1,18 @@
#include "openmc.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
// calculation.
int openmc_run() {
openmc_simulation_init();
int err = 0;
int status = 0;
while (status == 0 && err == 0) {
err = openmc_next_batch(&status);
}
openmc_simulation_finalize();
return err;
}