Move openmc_init, initialize_batch, openmc_simulation_finalize to C++

This commit is contained in:
Paul Romano 2018-10-16 19:24:37 -05:00
parent 1c7ebf198e
commit ccf1ced25e
18 changed files with 211 additions and 199 deletions

View file

@ -5,9 +5,6 @@
#include "mpi.h"
#endif
extern "C" void print_usage();
extern "C" void print_version();
namespace openmc {
int parse_command_line(int argc, char* argv[]);

View file

@ -20,7 +20,7 @@ void header(const char* msg, int level);
//! Display information regarding cell overlap checking.
//==============================================================================
extern "C" void print_overlap_check();
void print_overlap_check();
extern "C" void title();

View file

@ -17,6 +17,7 @@ extern "C" const int STREAM_SOURCE;
extern "C" const int STREAM_URR_PTABLE;
extern "C" const int STREAM_VOLUME;
extern "C" const int STREAM_PHOTON;
constexpr int64_t DEFAULT_SEED = 1;
//==============================================================================
//! Generate a pseudo-random number using a linear congruential generator.

View file

@ -56,6 +56,9 @@ void calculate_work();
//! Initialize simulation
extern "C" void openmc_simulation_init_c();
//! Initialize a batch
extern "C" void initialize_batch();
//! Initialize a fission generation
extern "C" void initialize_generation();

View file

@ -38,9 +38,14 @@ private:
// Global variables
//==============================================================================
extern Timer time_active;
extern Timer time_bank;
extern Timer time_bank_sample;
extern Timer time_bank_sendrecv;
extern Timer time_finalize;
extern Timer time_inactive;
extern Timer time_initialize;
extern Timer time_total;
} // namespace openmc