pystencils.grids.tensor_field.MemoryLayout#
- class pystencils.grids.tensor_field.MemoryLayout(value)#
Common field memory layouts available in pystencils.
- LEFTMOST = 1#
Leftmost-first (Fortran-style) layout
The leftmost buffer coordinate has stride one, and strides increase monotonically left-to-right.
- RIGHTMOST = 2#
Rightmost-first (C/NumPy-style) layout
The rightmost buffer coordinate has stride one, and strides increase monotonically right-to-left.
- ZYXF = 3#
Naturally ordered Array-of-Structures layout.
Spatial dimensions are ordered Z-Y-X (x fastest, z the slowest coordinate). Values for each spatial index are stored in packed fashion; for multidimensional per-point data, memory order inside the pack is determined by the field type.
- FZYX = 1#
Naturally ordered Structure-of-Arrays layout.
Spatial dimensions are ordered Z-Y-X (x fastest, z the slowest coordinate). Values for each spatial index are linearized separately, such that the same structure entry on adjacent nodes are also adjacent in memory (i.e.
x-stride is always1.)
- FORTRAN = 1#
- SOA = 1#
- C = 2#
- NUMPY = 2#
- AOS = 3#