relentless.model.Extent#

class relentless.model.Extent#

Abstract base class defining a region of space.

An Extent can be any region of space; typically, it is a simulation “box.” Any deriving class must implement the extent method that computes the scalar size of the region. Additionally, methods to serialize and deserialize an Extent must be specified so that the object can be saved to disk.

Methods

from_json(data)

Deserialize from a dictionary.

to_json()

Serialize as a dictionary.

Attributes

extent

Extent of the region.

abstract property extent#

Extent of the region.

Type:

float

abstract classmethod from_json(data)#

Deserialize from a dictionary.

Returns:

The object reconstructed from the data.

Return type:

Extent

abstract to_json()#

Serialize as a dictionary.

The serialized data can be saved to file as JSON data.

Returns:

The serialized data.

Return type:

dict