fixed event-based issue. Moving particle allocation to once per simulation was causing incorrect answers. The cause was that the particle tally accumulators were not being reset to 0 each iteration. The fix was to reset the particle acccumulation variables at particle death (could instead be done in initialize_history() function, if desired).

This commit is contained in:
John Tramm 2020-01-08 21:04:48 +00:00
parent d777861bd4
commit 5e640f79ab
2 changed files with 8 additions and 2 deletions

View file

@ -32,9 +32,9 @@ env:
matrix:
include:
- python: "3.7"
env: OMP=y MPI=y PHDF5=y DAGMC=y EVENT_BASED=y
env: OMP=y MPI=n PHDF5=n DAGMC=n EVENT_BASED=y
- python: "3.7"
env: OMP=y MPI=y PHDF5=y DAGMC=y EVENT_BASED=n
env: OMP=y MPI=n PHDF5=n DAGMC=n EVENT_BASED=n
notifications:
webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN
install:

View file

@ -391,6 +391,12 @@ Particle::event_death()
global_tally_tracklength += tally_tracklength_;
#pragma omp atomic
global_tally_leakage += tally_leakage_;
// Reset particle tallies once accumulated
tally_absorption_ = 0.0;
tally_collision_ = 0.0;
tally_tracklength_ = 0.0;
tally_leakage_ = 0.0;
}