removed thread private global tally accumulators and moved them to particle. They now atomically accumulate at particle death.

This commit is contained in:
John Tramm 2020-01-03 21:09:44 +00:00
parent eba244a1c0
commit d4c63ed0bb
7 changed files with 40 additions and 18 deletions

View file

@ -330,6 +330,11 @@ public:
std::vector<std::vector<Position>> tracks_;
NuBank nu_bank_[15];
double tally_absorption_ {0.0};
double tally_collision_ {0.0};
double tally_tracklength_ {0.0};
double tally_leakage_ {0.0};
};
} // namespace openmc

View file

@ -167,8 +167,6 @@ extern double global_tally_absorption;
extern double global_tally_collision;
extern double global_tally_tracklength;
extern double global_tally_leakage;
#pragma omp threadprivate(global_tally_absorption, global_tally_collision, \
global_tally_tracklength, global_tally_leakage)
//==============================================================================
// Non-member functions