Move code related to k_generation to C++

This commit is contained in:
Paul Romano 2018-10-12 08:01:23 -05:00
parent d7da87ca1d
commit 8ebd26b160
11 changed files with 126 additions and 102 deletions

View file

@ -408,10 +408,10 @@ constexpr int STANDARD_DEVIATION {3};
// Global tally parameters
constexpr int N_GLOBAL_TALLIES {4};
constexpr int K_COLLISION {1};
constexpr int K_ABSORPTION {2};
constexpr int K_TRACKLENGTH {3};
constexpr int LEAKAGE {4};
constexpr int K_COLLISION {0};
constexpr int K_ABSORPTION {1};
constexpr int K_TRACKLENGTH {2};
constexpr int LEAKAGE {3};
// Differential tally independent variables
constexpr int DIFF_DENSITY {1};

View file

@ -14,6 +14,7 @@ namespace openmc {
// Global variables
//==============================================================================
extern double keff_generation; //!< Single-generation k on each processor
extern std::vector<double> entropy; //!< Shannon entropy at each generation
extern xt::xtensor<double, 1> source_frac; //!< Source fraction for UFS
@ -24,6 +25,9 @@ extern "C" int64_t n_bank;
// Non-member functions
//==============================================================================
//! Collect/normalize the tracklength keff from each process
extern "C" void calculate_generation_keff();
//! Sample/redistribute source sites from accumulated fission sites
extern "C" void synchronize_bank();

View file

@ -56,6 +56,9 @@ void calculate_work();
//! Initialize simulation
extern "C" void openmc_simulation_init_c();
//! Initialize a fission generation
extern "C" void initialize_generation();
//! Determine overall generation number
extern "C" int overall_generation();