mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge branch 'develop' into release-0.7.0
This commit is contained in:
commit
d050b56d9f
7 changed files with 46 additions and 12 deletions
|
|
@ -287,6 +287,22 @@ foreach(test ${TESTS})
|
|||
WORKING_DIRECTORY ${TEST_PATH}
|
||||
COMMAND $<TARGET_FILE:openmc> -p ${TEST_PATH})
|
||||
|
||||
elseif(${test} MATCHES "test_filter_distribcell")
|
||||
|
||||
# Add each case for distribcell tests
|
||||
add_test(NAME ${TEST_NAME}_case-1
|
||||
WORKING_DIRECTORY ${TEST_PATH}/case-1
|
||||
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-1)
|
||||
add_test(NAME ${TEST_NAME}_case-2
|
||||
WORKING_DIRECTORY ${TEST_PATH}/case-2
|
||||
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-2)
|
||||
add_test(NAME ${TEST_NAME}_case-3
|
||||
WORKING_DIRECTORY ${TEST_PATH}/case-3
|
||||
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-3)
|
||||
add_test(NAME ${TEST_NAME}_case-4
|
||||
WORKING_DIRECTORY ${TEST_PATH}/case-4
|
||||
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-4)
|
||||
|
||||
# If a restart test is encounted, need to run with -r and restart file(s)
|
||||
elseif(${test} MATCHES "restart")
|
||||
|
||||
|
|
|
|||
|
|
@ -82,11 +82,11 @@ def clean_xml_indentation(element, level=0):
|
|||
if not element.tail or not element.tail.strip():
|
||||
element.tail = i
|
||||
|
||||
for element in element:
|
||||
clean_xml_indentation(element, level+1)
|
||||
for sub_element in element:
|
||||
clean_xml_indentation(sub_element, level+1)
|
||||
|
||||
if not element.tail or not element.tail.strip():
|
||||
element.tail = i
|
||||
if not sub_element.tail or not sub_element.tail.strip():
|
||||
sub_element.tail = i
|
||||
|
||||
else:
|
||||
if level and (not element.tail or not element.tail.strip()):
|
||||
|
|
|
|||
|
|
@ -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