pystencils.grids.tensor_field.TensorFieldAccess#

class pystencils.grids.tensor_field.TensorFieldAccess(tfield, spatial_offsets, tensor_indices)#

Access into a tensor field.

Expression representing an access to a single tensor entry of a tensor field.

Create instances of this class using the [] and () operators of TensorField.

Parameters:
  • tfield (TensorField | AtomProxy[TensorField])

  • spatial_offsets (tuple[SupportsIndex | sp.Basic, ...] | sp.Tuple)

  • tensor_indices (tuple[SupportsIndex | sp.Basic, ...] | sp.Tuple)

Return type:

TensorFieldAccess

property field: TensorField#

Field accessed by this expression

property offsets: Tuple#

Offsets relative to the current iteration point of this access

property indices: Tuple#

Tensor indices of this access

get_buffer_indices()#

Indices into the field’s memory buffer for this field access

Return type:

tuple[Basic, ...]