Bug Description
Direct reading of a geometry.xml file and immediate writing of the file is altering the geometry unintentionally.
Steps to Reproduce
for a cell defined as:
<cell id="1" material="4" region="1 -6 (-2 -4) | (-5 3)" universe="1"/>
Run a simple python code:
geom = openmc.Geometry.from_xml('/lustre/home/jk8173/FNG_ss/openmc/write_geometry_test/geometry.2.xml')
geom.export_to_xml('geometry.out.xml')
The outputted cell is defined as,
<cell id="1" material="4" region="(1 -6 -2 -4) | (-5 3)" universe="1"/>
Which substantially changes the geometry.
I believe the intention of the code is correct, as logically speaking these two definitions are the same. However, in OpenMC, the first line is read as:
<cell id="1" material="4" region="1 -6 ( (-2 -4) | (-5 3) )" universe="1"/>
Environment
OpenMC version 0.15.3-dev110
Ran on Linux
geometry.2.xml