From 2d848401c109256409d5e7ca2e2db270b1cc162d Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Sun, 19 Mar 2017 17:44:56 -0400 Subject: [PATCH] Added docstrings to model methods --- openmc/model/model.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openmc/model/model.py b/openmc/model/model.py index 13868f339c..18c435d513 100644 --- a/openmc/model/model.py +++ b/openmc/model/model.py @@ -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()