Skip to content

Commit d050b56

Browse files
committed
Merge branch 'develop' into release-0.7.0
2 parents 487562c + ff6f8b3 commit d050b56

File tree

7 files changed

+46
-12
lines changed

7 files changed

+46
-12
lines changed

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,22 @@ foreach(test ${TESTS})
287287
WORKING_DIRECTORY ${TEST_PATH}
288288
COMMAND $<TARGET_FILE:openmc> -p ${TEST_PATH})
289289

290+
elseif(${test} MATCHES "test_filter_distribcell")
291+
292+
# Add each case for distribcell tests
293+
add_test(NAME ${TEST_NAME}_case-1
294+
WORKING_DIRECTORY ${TEST_PATH}/case-1
295+
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-1)
296+
add_test(NAME ${TEST_NAME}_case-2
297+
WORKING_DIRECTORY ${TEST_PATH}/case-2
298+
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-2)
299+
add_test(NAME ${TEST_NAME}_case-3
300+
WORKING_DIRECTORY ${TEST_PATH}/case-3
301+
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-3)
302+
add_test(NAME ${TEST_NAME}_case-4
303+
WORKING_DIRECTORY ${TEST_PATH}/case-4
304+
COMMAND $<TARGET_FILE:openmc> ${TEST_PATH}/case-4)
305+
290306
# If a restart test is encounted, need to run with -r and restart file(s)
291307
elseif(${test} MATCHES "restart")
292308

openmc/clean_xml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ def clean_xml_indentation(element, level=0):
8282
if not element.tail or not element.tail.strip():
8383
element.tail = i
8484

85-
for element in element:
86-
clean_xml_indentation(element, level+1)
85+
for sub_element in element:
86+
clean_xml_indentation(sub_element, level+1)
8787

88-
if not element.tail or not element.tail.strip():
89-
element.tail = i
88+
if not sub_element.tail or not sub_element.tail.strip():
89+
sub_element.tail = i
9090

9191
else:
9292
if level and (not element.tail or not element.tail.strip()):

src/eigenvalue.F90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,19 @@ subroutine finalize_generation()
176176
!$omp critical
177177
global_tallies(K_TRACKLENGTH) % value = &
178178
global_tallies(K_TRACKLENGTH) % value + global_tally_tracklength
179-
global_tallies(K_COLLISION) % value = &
179+
global_tallies(K_COLLISION) % value = &
180180
global_tallies(K_COLLISION) % value + global_tally_collision
181-
global_tallies(LEAKAGE) % value = &
181+
global_tallies(LEAKAGE) % value = &
182182
global_tallies(LEAKAGE) % value + global_tally_leakage
183-
global_tallies(K_ABSORPTION) % value = &
183+
global_tallies(K_ABSORPTION) % value = &
184184
global_tallies(K_ABSORPTION) % value + global_tally_absorption
185185
!$omp end critical
186186

187187
! reset private tallies
188-
global_tally_tracklength = 0
189-
global_tally_collision = 0
190-
global_tally_leakage = 0
191-
global_tally_absorption = 0
188+
global_tally_tracklength = ZERO
189+
global_tally_collision = ZERO
190+
global_tally_leakage = ZERO
191+
global_tally_absorption = ZERO
192192
!$omp end parallel
193193

194194
#ifdef _OPENMP

src/fixed_source.F90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ end subroutine initialize_batch
117117

118118
subroutine finalize_batch()
119119

120+
! Update global tallies with the omp private accumulation variables
121+
!$omp parallel
122+
!$omp critical
123+
global_tallies(LEAKAGE) % value = &
124+
global_tallies(LEAKAGE) % value + global_tally_leakage
125+
!$omp end critical
126+
127+
! reset private tallies
128+
global_tally_leakage = ZERO
129+
!$omp end parallel
130+
120131
! Collect and accumulate tallies
121132
call time_tallies % start()
122133
call synchronize_tallies()

src/output.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module output
77
use endf, only: reaction_name
88
use error, only: fatal_error, warning
99
use geometry_header, only: Cell, Universe, Surface, Lattice, RectLattice, &
10-
&HexLattice, BASE_UNIVERSE
10+
HexLattice, BASE_UNIVERSE
1111
use global
1212
use math, only: t_percentile
1313
use mesh_header, only: StructuredMesh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
tally 1:
22
4.483337E+02
33
2.017057E+04
4+
leakage:
5+
9.820000E+00
6+
9.648000E+00

tests/test_fixed_source/test_fixed_source.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def _get_results(self):
2828
outstr += '\n'.join(results) + '\n'
2929
tally_num += 1
3030

31+
outstr += 'leakage:\n'
32+
outstr += '{0:12.6E}'.format(sp._global_tallies[3][0]) + '\n'
33+
outstr += '{0:12.6E}'.format(sp._global_tallies[3][1]) + '\n'
34+
3135
return outstr
3236

3337

0 commit comments

Comments
 (0)