Field class should remember its entire memory layout
Currently, the Field class only remembers the order of its spatial dimensions in its layout property, but forgets about its index dimensions. As a consequence, whether a field was created with fzyx or zyxf layout specification cannot be determined later on.
This should be fixed, since the order of all dimensions can be crucial information for a runtime system.
Proposition
- Deprecate and later remove the
layoutproperty (it has always had a misleading name). - Introduce something like a
spatial_axes_orderwith the same semantics, meaning it holds the iteration order of the spatial dimensions. Thespatial_axes_ordercan translate directly to the loop order (for CPU) or thread index translation order (for GPU). - In addition, introduce the more general
axes_orderproperty which describes the linearization order of all dimensions, spatial and index. This information is required when inferring and checking mappings of fields onto array data structures, such asstd::mdspaninpystencils-sfg, or waLBerla fields.
Edited by Frederik Hennig