mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #442 from walshjon/hotfix-src
Hotfix for fixed-source leakage bug
This commit is contained in:
commit
ff6f8b36db
5 changed files with 26 additions and 8 deletions
|
|
@ -176,19 +176,19 @@ contains
|
|||
!$omp critical
|
||||
global_tallies(K_TRACKLENGTH) % value = &
|
||||
global_tallies(K_TRACKLENGTH) % value + global_tally_tracklength
|
||||
global_tallies(K_COLLISION) % value = &
|
||||
global_tallies(K_COLLISION) % value = &
|
||||
global_tallies(K_COLLISION) % value + global_tally_collision
|
||||
global_tallies(LEAKAGE) % value = &
|
||||
global_tallies(LEAKAGE) % value = &
|
||||
global_tallies(LEAKAGE) % value + global_tally_leakage
|
||||
global_tallies(K_ABSORPTION) % value = &
|
||||
global_tallies(K_ABSORPTION) % value = &
|
||||
global_tallies(K_ABSORPTION) % value + global_tally_absorption
|
||||
!$omp end critical
|
||||
|
||||
! reset private tallies
|
||||
global_tally_tracklength = 0
|
||||
global_tally_collision = 0
|
||||
global_tally_leakage = 0
|
||||
global_tally_absorption = 0
|
||||
global_tally_tracklength = ZERO
|
||||
global_tally_collision = ZERO
|
||||
global_tally_leakage = ZERO
|
||||
global_tally_absorption = ZERO
|
||||
!$omp end parallel
|
||||
|
||||
#ifdef _OPENMP
|
||||
|
|
|
|||
|
|
@ -117,6 +117,17 @@ contains
|
|||
|
||||
subroutine finalize_batch()
|
||||
|
||||
! Update global tallies with the omp private accumulation variables
|
||||
!$omp parallel
|
||||
!$omp critical
|
||||
global_tallies(LEAKAGE) % value = &
|
||||
global_tallies(LEAKAGE) % value + global_tally_leakage
|
||||
!$omp end critical
|
||||
|
||||
! reset private tallies
|
||||
global_tally_leakage = ZERO
|
||||
!$omp end parallel
|
||||
|
||||
! Collect and accumulate tallies
|
||||
call time_tallies % start()
|
||||
call synchronize_tallies()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ module output
|
|||
use endf, only: reaction_name
|
||||
use error, only: fatal_error, warning
|
||||
use geometry_header, only: Cell, Universe, Surface, Lattice, RectLattice, &
|
||||
&HexLattice, BASE_UNIVERSE
|
||||
HexLattice, BASE_UNIVERSE
|
||||
use global
|
||||
use math, only: t_percentile
|
||||
use mesh_header, only: StructuredMesh
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
tally 1:
|
||||
4.483337E+02
|
||||
2.017057E+04
|
||||
leakage:
|
||||
9.820000E+00
|
||||
9.648000E+00
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class FixedSourceTestHarness(TestHarness):
|
|||
outstr += '\n'.join(results) + '\n'
|
||||
tally_num += 1
|
||||
|
||||
outstr += 'leakage:\n'
|
||||
outstr += '{0:12.6E}'.format(sp._global_tallies[3][0]) + '\n'
|
||||
outstr += '{0:12.6E}'.format(sp._global_tallies[3][1]) + '\n'
|
||||
|
||||
return outstr
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue