From 3e0dc41ea14e8402ec6f3a16330f57002dd91e0f Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Mon, 15 Jul 2019 20:05:47 -0500 Subject: [PATCH] Adding documentation to CAPI bounding box function. --- openmc/capi/core.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openmc/capi/core.py b/openmc/capi/core.py index d37e0de757..686dd78621 100644 --- a/openmc/capi/core.py +++ b/openmc/capi/core.py @@ -84,7 +84,7 @@ _dll.openmc_global_bounding_box.restype = c_int _dll.openmc_global_bounding_box.errcheck = _error_handler def global_bounding_box(): - + """Calculate a global bounding box for the model""" llc = np.zeros((3,), dtype=float) urc = np.zeros((3,), dtype=float) _dll.openmc_global_bounding_box(llc.ctypes.data_as(POINTER(c_double)), @@ -93,7 +93,15 @@ def global_bounding_box(): return llc, urc def bounding_box(geom_type, geom_id): + """Get a bounding box for a geometric object + Parameters + ---------- + geom_type : str + Type of geometry object. One of ('surface', 'cell', 'universe') + geom_id : int + Id of the object. Can be positive or negative for surfaces. + """ geomt = c_char_p(geom_type.encode()) llc = np.zeros((3,), dtype=float) urc = np.zeros((3,), dtype=float)