Non-periodic in x and y, periodic in z
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(mesh_t), | public, | pointer | :: | mesh | => | null() | |
| integer, | public | :: | nx_glob |
Global dimensions |
|||
| integer, | public | :: | ny_glob |
Global dimensions |
|||
| integer, | public | :: | nz_glob |
Global dimensions |
|||
| integer, | public | :: | nx_loc |
Local dimensions |
|||
| integer, | public | :: | ny_loc |
Local dimensions |
|||
| integer, | public | :: | nz_loc |
Local dimensions |
|||
| integer, | public | :: | nx_perm |
Local dimensions in the permuted slabs |
|||
| integer, | public | :: | ny_perm |
Local dimensions in the permuted slabs |
|||
| integer, | public | :: | nz_perm |
Local dimensions in the permuted slabs |
|||
| integer, | public | :: | nx_spec |
Local dimensions in the permuted slabs in spectral space |
|||
| integer, | public | :: | ny_spec |
Local dimensions in the permuted slabs in spectral space |
|||
| integer, | public | :: | nz_spec |
Local dimensions in the permuted slabs in spectral space |
|||
| integer, | public | :: | sp_st(3) |
Offset per spectral dimension (dim1, dim2, dim3) in spectral space |
|||
| complex(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | waves |
Local domain sized array storing the spectral equivalence constants |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | ax |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | bx |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | ay |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | by |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | az |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | bz |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | kx |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | ky |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | kz |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | exs |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | eys |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | ezs |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | k2x |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | k2y |
Wave numbers in x, y, and z |
||
| complex(kind=dp), | public, | allocatable, dimension(:) | :: | k2z |
Wave numbers in x, y, and z |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_x_re |
Staggered grid transformation |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_x_im |
Staggered grid transformation |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_y_re |
Staggered grid transformation |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_y_im |
Staggered grid transformation |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_z_re |
Staggered grid transformation |
||
| real(kind=dp), | public, | allocatable, dimension(:) | :: | trans_z_im |
Staggered grid transformation |
||
| logical, | public | :: | periodic_x |
Periodicity in x, y, and z |
|||
| logical, | public | :: | periodic_y |
Periodicity in x, y, and z |
|||
| logical, | public | :: | periodic_z |
Periodicity in x, y, and z |
|||
| logical, | public | :: | stretched_y | = | .false. |
Periodicity in x, y, and z |
|
| logical, | public | :: | stretched_y_sym |
Periodicity in x, y, and z |
|||
| character(len=3), | public | :: | bc_code |
Boundary condition case, see poisson_bc_code. The backend's init sets it first, ahead of base_init. |
|||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_odd_re |
Stretching operator matrices |
||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_odd_im |
Stretching operator matrices |
||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_even_re |
Stretching operator matrices |
||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_even_im |
Stretching operator matrices |
||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_re |
Stretching operator matrices |
||
| real(kind=dp), | public, | allocatable, dimension(:, :, :, :) | :: | a_im |
Stretching operator matrices |
||
| logical, | public | :: | lowmem | = | .false. |
lowmem option, only used in CUDA backend |
|
| complex(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | c_x | |||
| integer, | public | :: | p_row | = | 1 |
2decomp processor grid. p_row splits y in the x-pencil, p_col splits z. |
|
| integer, | public | :: | p_col | = | 1 |
2decomp processor grid. p_row splits y in the x-pencil, p_col splits z. |
|
| type(decomp_info), | public, | pointer | :: | sp | => | null() |
Spectral decomposition, and its y-pencil staging buffers. The FFT leaves the spectral slab in a z-pencil, which p_col splits along its dim2. In the 100 case that is the x modes, in the 010 case the y modes. The paired split in the postprocess couples a mode with its mirror in that same direction, so it needs that dimension whole. The y-pencil of the very same decomposition has dim2 complete for any processor grid, so 2decomp's own transpose delivers exactly the layout the pairing wants. In the 100 case and in the 010 case with a z split (p_col > 1), c_pair and waves_pair hold that y-pencil, and waves is redistributed once, at init. sp is associated for every case, since init also reads the spectral slab extents from it, but c_pair and waves_pair exist only when the pairing actually needs the hop. The 110 case also keeps a c_pair for its own hop, without a waves_pair. |
| complex(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | c_pair | |||
| complex(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | waves_pair | |||
| type(decomp_info), | public, | pointer | :: | ph | => | null() |
Physical space decomposition owned by the FFT, whose ph%xsz is the (nz, nx_loc, ny_loc) layout the transform reads. |
| real(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | r_tr |
Transposed real work buffer (nz, nx_loc, ny_loc), the x-pencil of ph. |
||
| type(decomp_info), | public | :: | dc |
Cell-dims decomposition, built separately because decomp_main is on vertex dims. Its x-pencil is the solver field layout (x whole, y split by p_row, z split by p_col); its z-pencil is, after a local (i,j,k)->(k,i,j) transpose, the x-pencil of ph. r_xp/r_yp/r_yp2/r_zp are its x-, y-, second y- and z-pencil staging buffers, only allocated on multiple ranks. r_yp2 is only needed when y is split (p_row > 1), since that is when the xy-periodicity fold needs a second y-pencil buffer alongside r_yp. |
|||
| real(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | r_xp | |||
| real(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | r_yp | |||
| real(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | r_yp2 | |||
| real(kind=dp), | public, | allocatable, dimension(:, :, :) | :: | r_zp |
Sets up the state every case shares. The backend's init calls it once it has set bc_code, which the spectral extents it passes in already depend on. The supported BC codes are the cases of the backend factories, create_omp_poisson_fft and create_cuda_poisson_fft.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| type(mesh_t), | intent(in), | target | :: | mesh | ||
| type(dirps_t), | intent(in) | :: | xdirps | |||
| type(dirps_t), | intent(in) | :: | ydirps | |||
| type(dirps_t), | intent(in) | :: | zdirps | |||
| integer, | intent(in), | dimension(3) | :: | n_spec | ||
| integer, | intent(in), | dimension(3) | :: | n_sp_st |
Gathers each non-periodic line into a periodic one, so that a plain FFT can stand in for the cosine transform, solves in spectral space, and scatters the result back. The 000 case has nothing to reorder and overrides this to transform f in place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f | |||
| class(field_t), | intent(inout) | :: | temp |
Stretching necessitates a special operation in spectral space. The coefficients for the operation are stored in matrix form.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| type(geo_t), | intent(in) | :: | geo | |||
| type(dirps_t), | intent(in) | :: | xdirps | |||
| type(dirps_t), | intent(in) | :: | ydirps | |||
| type(dirps_t), | intent(in) | :: | zdirps |
Spectral equivalence constants
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| type(geo_t), | intent(in) | :: | geo | |||
| type(dirps_t), | intent(in) | :: | xdirps | |||
| type(dirps_t), | intent(in) | :: | ydirps | |||
| type(dirps_t), | intent(in) | :: | zdirps |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | k |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | k |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(poisson_fft_t) | :: | self | ||||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | k |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_fft_t) | :: | self | ||||
| type(mesh_t), | intent(in), | target | :: | mesh | ||
| class(dirps_t), | intent(in) | :: | xdirps | |||
| class(dirps_t), | intent(in) | :: | ydirps | |||
| class(dirps_t), | intent(in) | :: | zdirps | |||
| logical, | intent(in), | optional | :: | lowmem |
Allocates c_pair, the y-pencil of sp, and when with_waves is set also waves_pair, redistributing waves into it once.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_fft_t) | :: | self | ||||
| logical, | intent(in) | :: | with_waves |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self | ||||
| type(mesh_t), | intent(in) | :: | mesh | |||
| integer, | intent(in) | :: | dims(3) |
Forward FFT for the non-periodic x and y case. Transposes the physical field (nx, ny, nz) to (nz, nx, ny) so that the r2c transform runs along the periodic z direction, then transforms with the plan set up in init.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self | ||||
| class(field_t), | intent(in) | :: | f_in |
Backward FFT for the non-periodic x and y case, undoing the transpose applied by fft_forward_110_omp. Only the unpadded extents are written, which is all undo_periodicity_xy_omp goes on to read.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f_out |
Post-process div U* in spectral space for the non-periodic x and y case. After the (nx, ny, nz) -> (nz, nx, ny) transpose applied by fft_forward_110_omp, dim1 holds the periodic z r2c modes, dim2 holds the non-periodic x modes and dim3 holds the non-periodic y modes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self |
Gathers the non-periodic x and, when it is not split across ranks, y lines into periodic ones so that a plain FFT can stand in for the cosine transform in both directions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f_out | |||
| class(field_t), | intent(in) | :: | f_in |
Scatters the gathered x and, when it is not split across ranks, y lines back to their original ordering.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omp_poisson_110_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f_out | |||
| class(field_t), | intent(in) | :: | f_in |