WVFourierStorageLayout
Describe how horizontal Fourier storage maps to the WaveVortex grid.
Overview
WVFourierStorageLayout is developer infrastructure shared by horizontal transform backends. It describes indexing only: the class does not execute an FFT, normalize coefficients, own a backend buffer, or select a transform backend. Model code continues to expose coefficients on the canonical WV grid with shape [Nbatch,Nkl].
Four representations appear in this contract:
- Spatial arrays have shape [Nx,Ny,Nbatch].
- Fourier storage has its natural backend shape. Full-complex storage is [Nx,Ny,Nbatch], half-x storage is [floor(Nx/2)+1,Ny,Nbatch], and half-y storage is [Nx,floor(Ny/2)+1,Nbatch].
- A Fourier row view reshapes the first two storage dimensions to [nFourierStorageRows,Nbatch]. No data is reordered by this reshape.
- The WV grid has shape [Nbatch,Nkl] and uses the ordering defined by WVGeometryDoublyPeriodic.
For real spatial fields, Fourier coefficients obey
\[\hat u(-k,-l)=\overline{\hat u(k,l)}.\]A full-complex layout stores both sides of this relation. A hermitian-half layout stores one side and recovers WV modes with a negative compressed-direction mode by conjugating the stored positive mode. On zero and even-grid Nyquist boundaries, the other horizontal mode may still require explicit Hermitian completion. Modes that are their own conjugates are made exactly real during insertion.
Mapping indices are one-based uint64 column vectors. They never contain Nbatch- or Nz-replicated offsets. A performance-sensitive backend may consume these properties directly, instead of calling the convenience mapping methods, when doing so preserves a measured MATLAB indexing and assignment expression.
This visible, sealed class is intended for WaveVortex backend developers. It is not an end-user modeling API and is not a supported subclassing point.
Topics
Developer Topics
These items document internal implementation details and are not part of the primary public API.
- Describe Fourier storage
NklNumber of horizontal coefficients in the canonical WV grid.WVFourierStorageLayoutCreate a Fourier-storage mapping for a doubly periodic geometry.compressedDimensionCompressed horizontal dimension for Hermitian-half storage.fourierStorageSizeNatural two-dimensional Fourier storage shape.fourierStorageTypeFourier storage representation, “full-complex” or “hermitian-half”.horizontalGridSizePhysical horizontal grid shape [Nx,Ny].mappingMethodMeasured MATLAB mapping implementation used by the layout.nFourierStorageRowsNumber of rows in the two-dimensional Fourier row view.
- Manage Fourier storage
allocateFourierStorageAllocate a zeroed complex Fourier row view.reshapeFourierRowsToStorageReshape a row view to natural Fourier-storage dimensions.reshapeFourierStorageToRowsReshape natural Fourier storage to its two-dimensional row view.
- Map Fourier storage and WV grid
conjugatedWVIndicesWV-grid indices recovered by conjugating stored Fourier rows.directWVIndicesWV-grid indices supplied directly by stored Fourier rows.fourierRowsForConjugatedWVIndicesFourier rows conjugated while recovering the corresponding WV modes.fourierRowsForDirectWVIndicesFourier rows copied directly to the corresponding WV indices.hermitianCompletionRowsDestination rows filled from Hermitian partners before an inverse FFT.hermitianSourceRowsStored rows whose conjugates fill hermitianCompletionRows.hermitianSourceWVIndicesWV-grid indices corresponding to hermitianSourceRows.selfConjugateFourierRowsFourier rows representing modes equal to their own Hermitian partner.transformFromFourierStorageToWVGridMap a Fourier row view to canonical WV-grid ordering.transformFromWVGridToFourierStorageInsert WV-grid coefficients into caller-owned Fourier storage.
- Legacy compatibility
expandedLegacyMappingsMaterialize the vertically expanded legacy full-storage mappings.
- Inspect Fourier storage
mappingMemoryBytesExact bytes occupied by all one-based uint64 mapping arrays.mappingMemoryUsageReturn exact memory usage for each mapping array.