![]() |
(git:e90df42)
|
Batched lattice Fourier transforms on regular k-point grids. More...
Data Types | |
| type | k_grid_to_cell_work_type |
Functions/Subroutines | |
| logical function, public | regular_kpoint_grid (xkp, nkp_grid, grid_index, k_offset, allow_incomplete) |
| Test and map a uniformly shifted reciprocal grid or an explicitly allowed subset. | |
| logical function, public | lattice_fft_shape (n, nfft, allow_arbitrary) |
| Find backend-supported FFT dimensions that preserve the original lattice grid. Sample the padded transform at integer multiples of the original cell indices. | |
| subroutine, public | cell_to_k_grid_fft (values_rs, index_to_cell, xkp, nkp_grid, values_k, used_fft, deriv_direction, hmat, selected_kpoints) |
| Transform a batch of real matrices from image cells to every supplied k point. | |
| subroutine, public | k_grid_to_cell_fft (values_k, xkp, nkp_grid, index_to_cell, values_rs, used_fft, weights, allow_incomplete) |
| Transform reciprocal-grid data back to image-cell values. | |
| subroutine, public | k_grid_to_cell_prepare (work, xkp, nkp_grid, index_to_cell, weights, allow_incomplete) |
| Prepare one inverse lattice transform for repeated matrix batches. | |
| subroutine, public | k_grid_to_cell_execute (work, values_k, values_rs, used_fft) |
| Execute a matrix batch using the prepared inverse lattice transform. Call outside OpenMP worker regions: fft_tools owns its shared pool and planner. | |
| subroutine, public | k_grid_to_cell_release (work) |
| Release call-scoped inverse lattice maps and FFT buffers. | |
Batched lattice Fourier transforms on regular k-point grids.
Image cells are folded modulo the reciprocal grid; shifted meshes use a phase twist. Forward transforms require a complete grid. The inverse transform can also embed an explicitly allowed subset with its supplied weights and zero missing points. Unsupported grids retain the direct phase-sum fallback.
| logical function, public kpoint_lattice_fft::regular_kpoint_grid | ( | real(kind=dp), dimension(:, :), intent(in) | xkp, |
| integer, dimension(3), intent(in) | nkp_grid, | ||
| integer, dimension(:, :), intent(out), optional | grid_index, | ||
| real(kind=dp), dimension(3), intent(out), optional | k_offset, | ||
| logical, intent(in), optional | allow_incomplete ) |
Test and map a uniformly shifted reciprocal grid or an explicitly allowed subset.
| xkp | reciprocal coordinates, in units of reciprocal lattice vectors |
| nkp_grid | regular-grid dimensions |
| grid_index | FFT-grid index for every k point |
| k_offset | common reciprocal-coordinate offset |
| allow_incomplete | accept a subset of a regular grid (missing points are zero) |
Definition at line 66 of file kpoint_lattice_fft.F.
| logical function, public kpoint_lattice_fft::lattice_fft_shape | ( | integer, dimension(3), intent(in) | n, |
| integer, dimension(3), intent(out) | nfft, | ||
| logical, intent(in), optional | allow_arbitrary ) |
Find backend-supported FFT dimensions that preserve the original lattice grid. Sample the padded transform at integer multiples of the original cell indices.
| n | original grid dimensions |
| nfft | supported integer multiples, if available |
| allow_arbitrary | use exact dimensions when supported by the active FFT backend |
Definition at line 125 of file kpoint_lattice_fft.F.
| subroutine, public kpoint_lattice_fft::cell_to_k_grid_fft | ( | real(kind=dp), dimension(:, :, :), intent(in) | values_rs, |
| integer, dimension(:, :), intent(in) | index_to_cell, | ||
| real(kind=dp), dimension(:, :), intent(in) | xkp, | ||
| integer, dimension(3), intent(in) | nkp_grid, | ||
| complex(kind=dp), dimension(:, :, :), intent(out) | values_k, | ||
| logical, intent(out), optional | used_fft, | ||
| integer, intent(in), optional | deriv_direction, | ||
| real(kind=dp), dimension(3, 3), intent(in), optional | hmat, | ||
| integer, dimension(:), intent(in), optional | selected_kpoints ) |
Transform a batch of real matrices from image cells to every supplied k point.
| values_rs | real-space matrices; the last dimension enumerates image cells |
| index_to_cell | integer lattice vector for every image cell |
| xkp | reciprocal coordinates of all requested k points |
| nkp_grid | dimensions of the candidate regular reciprocal grid |
| values_k | complex matrices at every k point |
| used_fft | reports whether the regular-grid FFT path was used |
| deriv_direction | optional Cartesian k derivative (1, 2, or 3) |
| hmat | direct-lattice cell matrix, required for a derivative |
| selected_kpoints | optional indices of k points to retain in values_k |
Definition at line 169 of file kpoint_lattice_fft.F.
| subroutine, public kpoint_lattice_fft::k_grid_to_cell_fft | ( | complex(kind=dp), dimension(:, :, :), intent(in) | values_k, |
| real(kind=dp), dimension(:, :), intent(in) | xkp, | ||
| integer, dimension(3), intent(in) | nkp_grid, | ||
| integer, dimension(:, :), intent(in) | index_to_cell, | ||
| complex(kind=dp), dimension(:, :, :), intent(out) | values_rs, | ||
| logical, intent(out), optional | used_fft, | ||
| real(kind=dp), dimension(:), intent(in), optional | weights, | ||
| logical, intent(in), optional | allow_incomplete ) |
Transform reciprocal-grid data back to image-cell values.
| values_k | complex matrices on the supplied reciprocal points |
| xkp | reciprocal coordinates, in units of reciprocal lattice vectors |
| nkp_grid | dimensions of the reciprocal grid |
| index_to_cell | integer lattice vector for every requested image cell |
| values_rs | reconstructed complex matrices in the requested image cells |
| used_fft | reports whether the regular-grid FFT path was used |
| weights | optional k weights; otherwise use the existing 1/number-of-points normalization |
| allow_incomplete | embed a unique regular-grid subset, zero-filling missing points |
Definition at line 296 of file kpoint_lattice_fft.F.
| subroutine, public kpoint_lattice_fft::k_grid_to_cell_prepare | ( | type(k_grid_to_cell_work_type), intent(inout) | work, |
| real(kind=dp), dimension(:, :), intent(in) | xkp, | ||
| integer, dimension(3), intent(in) | nkp_grid, | ||
| integer, dimension(:, :), intent(in) | index_to_cell, | ||
| real(kind=dp), dimension(:), intent(in), optional | weights, | ||
| logical, intent(in), optional | allow_incomplete ) |
Prepare one inverse lattice transform for repeated matrix batches.
| work | call-scoped maps, weights and buffers; no backend plan ownership |
| xkp | reciprocal coordinates |
| nkp_grid | candidate reciprocal-grid dimensions |
| index_to_cell | requested lattice translations |
| weights | final k weights, otherwise 1/number-of-points |
| allow_incomplete | allow missing grid points, with zero values |
Definition at line 325 of file kpoint_lattice_fft.F.
| subroutine, public kpoint_lattice_fft::k_grid_to_cell_execute | ( | type(k_grid_to_cell_work_type), intent(inout) | work, |
| complex(kind=dp), dimension(:, :, :), intent(in) | values_k, | ||
| complex(kind=dp), dimension(:, :, :), intent(out) | values_rs, | ||
| logical, intent(out), optional | used_fft ) |
Execute a matrix batch using the prepared inverse lattice transform. Call outside OpenMP worker regions: fft_tools owns its shared pool and planner.
| work | prepared transform; scratch is reused, never shared between concurrent callers |
| values_k | matrices at the prepared reciprocal points |
| values_rs | matrices at the prepared lattice translations |
| used_fft | whether this batch used FFT, including execution failure fallback |
Definition at line 376 of file kpoint_lattice_fft.F.
| subroutine, public kpoint_lattice_fft::k_grid_to_cell_release | ( | type(k_grid_to_cell_work_type), intent(inout) | work | ) |
Release call-scoped inverse lattice maps and FFT buffers.
| work | ... |
Definition at line 428 of file kpoint_lattice_fft.F.