From 64114167d1e7d2649ff4dd98ddd4f28fbf3699af Mon Sep 17 00:00:00 2001 From: bdlafleur Date: Wed, 24 Jan 2024 12:15:02 -0500 Subject: [PATCH] Adding impl tag descriptions to parameters (#1598) --- .../parameters/parameterDefinitions.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/armi/reactor/parameters/parameterDefinitions.py b/armi/reactor/parameters/parameterDefinitions.py index daa51afc9..f75ed771b 100644 --- a/armi/reactor/parameters/parameterDefinitions.py +++ b/armi/reactor/parameters/parameterDefinitions.py @@ -156,6 +156,17 @@ class Serializer: :id: I_ARMI_PARAM_SERIALIZE :implements: R_ARMI_PARAM_SERIALIZE + Important physical parameters are stored in every ARMI object. + These parameters represent the plant's state during execution + of the model. Currently, this requires that the parameters be serializable to a + numpy array of a datatype supported by the ``h5py`` package so that the data can + be written to, and subsequently read from, an HDF5 file. + + This class allows for these parameters to be serialized in a custom manner by + providing interfaces for packing and unpacking parameter data. The user or + downstream plugin is able to specify how data is serialized if that data is not + naturally serializable. + See Also -------- armi.bookkeeping.db.database3.packSpecialData @@ -344,6 +355,13 @@ def setter(self, setter): :id: I_ARMI_PARAM_PARALLEL :implements: R_ARMI_PARAM_PARALLEL + Parameters need to be handled properly during parallel code execution. This + includes notifying processes if a parameter has been updated by + another process. This method allows for setting a parameter's value as well + as an attribute that signals whether this parameter has been updated. Future + processes will be able to query this attribute so that the parameter's + status is properly communicated. + Notes ----- Unlike the traditional Python ``property`` class, this does not return a new @@ -587,6 +605,11 @@ def toWriteToDB(self, assignedMask: Optional[int] = None): :id: I_ARMI_PARAM_DB :implements: R_ARMI_PARAM_DB + This method is called when writing the parameters to the database file. It + queries the parameter's ``saveToDB`` attribute to ensure that this parameter + is desired for saving to the database file. It returns a list of parameters + that should be included in the database write operation. + Parameters ---------- assignedMask : int