pystencils.grids.protocols.IFieldAccess

pystencils.grids.protocols.IFieldAccess#

class pystencils.grids.protocols.IFieldAccess(*args, **kwargs)#

Interface for expressions that should be translated to buffer accesses for an algebraic field.

This protocol should be implemented by any expression types that constitute field accesses, to communicate the associated field and buffer indices to the code generator.

property field: IField#

Field associated with this field access

get_buffer_indices()#

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

Return type:

tuple[Basic, ...]