mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Adding StatePoint.close(). Updating some examples.
This commit is contained in:
parent
b62708f911
commit
983470ed4e
4 changed files with 175 additions and 142 deletions
|
|
@ -1 +0,0 @@
|
|||
../../tests/chain_simple.xml
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -153,9 +153,7 @@ class StatePoint:
|
|||
return self
|
||||
|
||||
def __exit__(self, *exc):
|
||||
self._f.close()
|
||||
if self._summary is not None:
|
||||
self._summary._f.close()
|
||||
self.close()
|
||||
|
||||
@property
|
||||
def cmfd_on(self):
|
||||
|
|
@ -490,6 +488,14 @@ class StatePoint:
|
|||
for tally_id in self.tallies:
|
||||
self.tallies[tally_id].sparse = self.sparse
|
||||
|
||||
def close(self):
|
||||
"""Close the statepoint HDF5 file and the corresponding
|
||||
summary HDF5 file if present.
|
||||
"""
|
||||
self._f.close()
|
||||
if self._summary is not None:
|
||||
self._summary._f.close()
|
||||
|
||||
def add_volume_information(self, volume_calc):
|
||||
"""Add volume information to the geometry within the file
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue