Domain decomposition

Pencil-like domain decomposition is adopted to parallelise the domain.

By default the domain is decomposed in the \(y\) direction (\(x1\) pencil), in which all variables in the spectral domain

\[\wav{\ux}{\ix \iy \iz}, \wav{\uy}{\ix \iy \iz}, \wav{\uz}{\ix \iy \iz}, \wav{ T}{\ix \iy \iz}\]

are defined. Note that they are all complex numbers whose data type is fftw_complex:

include/fluid.h
11fftw_complex * restrict s_x1_array;

Here the prefix s_ and x1_ denote the variables are in the spectral domain and stored as the x1 pencils.

To evaluate the non-linear terms in the physical domain based on the transform method, multi-dimensional discrete Fourier transforms are to be performed, whose results are stored as the \(y1\) pencil (or \(z1\) pencil for three-dimensional domains). Since they are real numbers in theory, I define them as double to save the storage and to roughly halve the number of operations needed:

include/fluid.h
14double * restrict p_y1_array;
include/fluid.h
17double * restrict p_z1_array;