# Memory layout (1D FDTD) **Memory layout** determines which simulation values are stored together. The field constructor allocates $E_z$ and $H_y$ independently: ```c fields->ff_width = width; fields->ff_hy = Fdtd_AllocArray(width, sizeof(Fdtd_FloatType)); fields->ff_ez = Fdtd_AllocArray(width, sizeof(Fdtd_FloatType)); ``` Each array contains one quantity across the grid. Material properties and update coefficients follow the same [[fdtd-openmp-structure-of-arrays|structure of arrays]] pattern. `Fdtd_FloatType` is currently `double`, and the allocation helper provides 64-byte alignment. The kernels traverse fields and prepared coefficients directly. Material arrays are consulted when coefficients are calculated, rather than re-evaluated inside every step. This makes the update's memory traffic easier to identify and keeps unrelated material data out of its inner loops. Source: [fdtd_ez_fields.c](https://github.com/yanevskiv/fdtd-openmp/blob/main/src/fdtd/Ez/fdtd_ez_fields.c).