pyre.grid.Tile

Module Contents

class pyre.grid.Tile.Tile(shape, layout=None, **kwds)

Encapsulation of the shape and layout of the contents of a grid that enable the separation of the topological aspects of a grid from its memory layout

Tiles are defined by providing two pieces of information

  • {shape}: a tuple of the extent of each grid index
  • {layout}: the packing order of the indices
shape = []
layout = []
size = 0
offset(self, index)

Compute the offset of the cell at the given {index} value

index(self, offset)

Compute the index that corresponds to the given {offset}

visit(self, begin, end, layout)

Generate a sequence of indices in the range {begin} to {end} in {layout} order

__getitem__(self, index)
__iter__(self)