mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Convert calculate_average_keff to C++
This commit is contained in:
parent
aeb145731b
commit
05ecbb153a
8 changed files with 88 additions and 76 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef OPENMC_EIGENVALUE_H
|
||||
#define OPENMC_EIGENVALUE_H
|
||||
|
||||
#include <array>
|
||||
#include <cstdint> // for int64_t
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -15,6 +16,7 @@ namespace openmc {
|
|||
//==============================================================================
|
||||
|
||||
extern double keff_generation; //!< Single-generation k on each processor
|
||||
extern std::array<double, 2> k_sum; //!< Used to reduce sum and sum_sq
|
||||
extern std::vector<double> entropy; //!< Shannon entropy at each generation
|
||||
extern xt::xtensor<double, 1> source_frac; //!< Source fraction for UFS
|
||||
|
||||
|
|
@ -28,6 +30,13 @@ extern "C" int64_t n_bank;
|
|||
//! Collect/normalize the tracklength keff from each process
|
||||
extern "C" void calculate_generation_keff();
|
||||
|
||||
//! Calcaulte mean/standard deviation of keff during active generations
|
||||
//!
|
||||
//! This function sets the global variables keff and keff_std which represent
|
||||
//! the mean and standard deviation of the mean of k-effective over active
|
||||
//! generations. It also broadcasts the value from the master process.
|
||||
extern "C" void calculate_average_keff();
|
||||
|
||||
//! Sample/redistribute source sites from accumulated fission sites
|
||||
extern "C" void synchronize_bank();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ namespace openmc {
|
|||
|
||||
extern "C" void write_source_bank(hid_t group_id, Bank* source_bank);
|
||||
extern "C" void read_source_bank(hid_t group_id, Bank* source_bank);
|
||||
|
||||
extern "C" void write_tally_results_nr(hid_t file_id);
|
||||
extern "C" void restart_set_keff();
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_STATE_POINT_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue