mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Make random ray boolean parsing case-insensitive for proper round-trip
Co-authored-by: jtramm <1009059+jtramm@users.noreply.github.com>
This commit is contained in:
parent
f6978dcbdf
commit
8743e9dc0d
2 changed files with 3 additions and 3 deletions
|
|
@ -2122,11 +2122,11 @@ class Settings:
|
|||
self.random_ray['source_shape'] = child.text
|
||||
elif child.tag == 'volume_normalized_flux_tallies':
|
||||
self.random_ray['volume_normalized_flux_tallies'] = (
|
||||
child.text in ('true', '1')
|
||||
child.text.lower() in ('true', '1')
|
||||
)
|
||||
elif child.tag == 'adjoint':
|
||||
self.random_ray['adjoint'] = (
|
||||
child.text in ('true', '1')
|
||||
child.text.lower() in ('true', '1')
|
||||
)
|
||||
elif child.tag == 'sample_method':
|
||||
self.random_ray['sample_method'] = child.text
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ def test_export_to_xml(run_in_tmpdir):
|
|||
assert recovered_mesh.upper_right == [2., 2., 2.]
|
||||
assert s.random_ray['volume_estimator'] == 'hybrid'
|
||||
assert s.random_ray['source_shape'] == 'linear'
|
||||
assert s.random_ray['volume_normalized_flux_tallies'] == False
|
||||
assert s.random_ray['volume_normalized_flux_tallies'] == True
|
||||
assert s.random_ray['adjoint'] == False
|
||||
assert s.random_ray['sample_method'] == 'halton'
|
||||
assert s.max_secondaries == 1_000_000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue