:py:mod:`gnome.spills.le` ========================= .. py:module:: gnome.spills.le Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: gnome.spills.le.LEData .. py:class:: LEData(name=None, *args, **kwargs) Bases: :py:obj:`collections.abc.MutableMapping`, :py:obj:`gnome.gnomeobject.AddLogger`, :py:obj:`dict` A MutableMapping is a generic container for associating key/value pairs. This class provides concrete generic implementations of all methods except for __getitem__, __setitem__, __delitem__, __iter__, and __len__. Initialize self. See help(type(self)) for accurate signature. .. py:property:: num_released The number of elements currently in the SpillContainer If SpillContainer is initialized, all data_arrays exist as ndarrays even if no elements are released. So this will always return a valid int >= 0. .. py:attribute:: clear .. py:attribute:: __str__ .. py:method:: rewind() .. py:method:: __eq__(other) Compare equality of two LEData objects .. py:method:: __ne__(other) Return self!=value. .. py:method:: __len__() The "length" of a spill container is the number of elements in it. The first dimension of any ndarray in our data_arrays will always be the number of elements that are contained in a SpillContainer. .. py:method:: __getitem__(key) x.__getitem__(y) <==> x[y] .. py:method:: __setitem__(key, value) Set self[key] to value. .. py:method:: _set_existing_LEData(key, value) .. py:method:: __delitem__(key) Delete self[key]. .. py:method:: __iter__() Implement iter(self). .. py:method:: __repr__() Return repr(self). .. py:method:: prepare_for_model_run(array_types, substance) .. py:method:: initialize_data_arrays() initialize_data_arrays() is called without input data during rewind and prepare_for_model_run to prepare the buffers and define the data arrays. .. py:method:: extend_data_arrays(num_new_elements) Adds num_new_elements to the data arrays. Resizes the arrays as necessary. Data arrays are set to their initial_values :param int num_new_elements: number of particles released