mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Added docstrings to model methods
This commit is contained in:
parent
512a21b093
commit
2d848401c1
1 changed files with 17 additions and 0 deletions
|
|
@ -107,6 +107,20 @@ class Model(object):
|
|||
self.cmfd.export_to_xml()
|
||||
|
||||
def execute(self, output=True):
|
||||
"""Creates the XML files, runs OpenMC, and loads the statepoint.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
output : bool
|
||||
Capture OpenMC output from standard out, defaults to True
|
||||
|
||||
Returns
|
||||
-------
|
||||
Iterable of float
|
||||
k_combined from the statepoint
|
||||
|
||||
"""
|
||||
|
||||
self.export_to_xml()
|
||||
|
||||
openmc.run(output=output)
|
||||
|
|
@ -121,6 +135,9 @@ class Model(object):
|
|||
return self.sp.k_combined
|
||||
|
||||
def close(self):
|
||||
"""Close the statepoint and summary files
|
||||
"""
|
||||
|
||||
if self.sp is not None:
|
||||
self.sp._f.close()
|
||||
self.sp.summary._f.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue