Move variable definitions from simulation_header.F90 to simulation.cpp

This commit is contained in:
Paul Romano 2018-10-10 07:17:52 -05:00
parent d3b9d65fc7
commit 3ba886cd6d
3 changed files with 52 additions and 22 deletions

View file

@ -29,8 +29,33 @@ namespace openmc {
namespace simulation {
int current_batch;
int current_gen;
int64_t current_work;
double keff {1.0};
double keff_std;
double k_col_abs {0.0};
double k_col_tra {0.0};
double k_abs_tra {0.0};
double log_spacing;
int n_lost_particles {0};
bool need_depletion_rx {false};
int restart_batch;
bool satisfy_triggers {false};
bool simulation_initialized {false};
int total_gen {0};
int64_t work;
std::vector<double> k_generation;
std::vector<int64_t> work_index;
// Threadprivate variables
bool trace; //!< flag to show debug information
#ifdef _OPENMP
int n_threads {-1}; //!< number of OpenMP threads
int thread_id; //!< ID of a given thread
#endif
} // namespace simulation
//==============================================================================
@ -43,6 +68,12 @@ void openmc_simulation_init_c()
calculate_work();
}
int overall_generation()
{
using namespace simulation;
return settings::gen_per_batch*(current_batch - 1) + current_gen;
}
void calculate_work()
{
// Determine minimum amount of particles to simulate on each processor