pystencils.grids.staggered_field.StaggeredFieldAccess

pystencils.grids.staggered_field.StaggeredFieldAccess#

class pystencils.grids.staggered_field.StaggeredFieldAccess(staggered_grid, spatial_offsets, edge_index, vector_index=None)#

A direct access to the value stored on one edge of a staggered grid cell.

An access is fully described by the grid, the spatial offset of the cell, the stored edge index (one of the positive staggered_entries), and – for vector grids – a component index. There is deliberately no sign or “reflected” mode: reading the value associated with a non-stored direction is expressed as an ordinary -1 * access via StaggeredField.face.

Parameters:
Return type:

StaggeredFieldAccess

property index: Expr#

Index of the stored edge this access refers to.

property vector_index: Integer | None#

Component index for vector staggered grids; None for scalar grids.