gnome.spills.le

Module Contents

Classes

LEData

A MutableMapping is a generic container for associating

class gnome.spills.le.LEData(name=None, *args, **kwargs)

Bases: collections.abc.MutableMapping, gnome.gnomeobject.AddLogger, 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.

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.

clear
__str__
rewind()
__eq__(other)

Compare equality of two LEData objects

__ne__(other)

Return self!=value.

__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.

__getitem__(key)

x.__getitem__(y) <==> x[y]

__setitem__(key, value)

Set self[key] to value.

_set_existing_LEData(key, value)
__delitem__(key)

Delete self[key].

__iter__()

Implement iter(self).

__repr__()

Return repr(self).

prepare_for_model_run(array_types, substance)
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.

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

Parameters:

num_new_elements (int) – number of particles released