(git:5e7fe52)
Loading...
Searching...
No Matches
lattice_preconditioner_operator Module Reference

Block-circulant inverse operators for replicated-cell OT preconditioners. More...

Functions/Subroutines

subroutine, public lattice_grid (lattice_dims, index_to_cell, xkp)
 Enumerate a regular direct/reciprocal lattice with the first direction varying fastest.
subroutine, public build_lattice_inverse (operator_matrix, lattice_dims, inverse_k, projection_error, used_fft, info)
 Project a cell-major SPD operator onto lattice translations and invert its Fourier blocks.
subroutine, public build_lattice_inverse_from_blocks (blocks, lattice_dims, inverse_k, used_fft, info)
 Transform and invert already projected real-space lattice blocks.
subroutine, public build_lattice_local_correction (operator_matrix, lattice_dims, local_cell_count, correction_indices, operator_columns, coarse_inverse, corrected_projection_error, info)
 Build a balanced local correction for selected non-circulant cell blocks.
pure real(kind=dp) function, public lattice_fft_cost_ratio (lattice_dims, block_size, rhs_count, num_pe)
 Estimate lattice-FFT application work relative to a dense inverse application.
pure real(kind=dp) function, public lattice_fft_storage_ratio (lattice_dims, operator_count)
 Estimate reciprocal-block storage relative to one dense real operator.
pure real(kind=dp) function, public lattice_local_cost_ratio (lattice_dims, local_cell_count)
 Estimate balanced-local-correction work relative to a dense inverse application.
pure real(kind=dp) function, public lattice_local_storage_ratio (lattice_dims, operator_count, local_cell_count)
 Estimate balanced-local-correction storage relative to one dense real operator.
pure logical function, public lattice_fft_auto_select (lattice_dims, block_size, rhs_count, operator_count, num_pe, projection_error, used_fft, info)
 Conservative error-, work-, and storage-aware AUTO selector.
subroutine, public apply_lattice_inverse_dense (inverse_k, lattice_dims, matrix_in, matrix_out, used_fft, imaginary_residual)
 Apply inverse Fourier blocks to a dense cell-major real matrix.
subroutine, public apply_lattice_state_inverse_dense (inverse_k, lattice_dims, matrix_in, matrix_out, used_fft, imaginary_residual, state_indices)
 Apply one inverse Fourier operator to every column of a dense real matrix.

Variables

integer, parameter, public lattice_fft_auto_min_cells = 8
real(kind=dp), parameter, public lattice_fft_auto_max_error = 1.0E-3_dp
real(kind=dp), parameter, public lattice_fft_auto_max_cost_ratio = 0.8_dp
real(kind=dp), parameter, public lattice_fft_auto_max_storage_ratio = 4.0_dp

Detailed Description

Block-circulant inverse operators for replicated-cell OT preconditioners.

Function/Subroutine Documentation

◆ lattice_grid()

subroutine, public lattice_preconditioner_operator::lattice_grid ( integer, dimension(3), intent(in) lattice_dims,
integer, dimension(:, :), intent(out) index_to_cell,
real(kind=dp), dimension(:, :), intent(out) xkp )

Enumerate a regular direct/reciprocal lattice with the first direction varying fastest.

Parameters
lattice_dimsnumber of cells in every lattice direction
index_to_cellinteger direct-lattice coordinates
xkpfractional reciprocal-lattice coordinates

Definition at line 54 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ build_lattice_inverse()

subroutine, public lattice_preconditioner_operator::build_lattice_inverse ( real(kind=dp), dimension(:, :), intent(in) operator_matrix,
integer, dimension(3), intent(in) lattice_dims,
complex(kind=dp), dimension(:, :, :), intent(out), allocatable inverse_k,
real(kind=dp), intent(out) projection_error,
logical, intent(out) used_fft,
integer, intent(out) info )

Project a cell-major SPD operator onto lattice translations and invert its Fourier blocks.

Parameters
operator_matrixdense SPD matrix with identical cell blocks stored consecutively
lattice_dimsnumber of replicated cells in every lattice direction
inverse_kinverse Hermitian operator block at every reciprocal-grid point
projection_errorrelative Frobenius error of the block-circulant projection
used_fftreports whether construction used the FFT path
infozero on success; otherwise the failing Cholesky factorization index

Definition at line 93 of file lattice_preconditioner_operator.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_lattice_inverse_from_blocks()

subroutine, public lattice_preconditioner_operator::build_lattice_inverse_from_blocks ( real(kind=dp), dimension(:, :, :), intent(in) blocks,
integer, dimension(3), intent(in) lattice_dims,
complex(kind=dp), dimension(:, :, :), intent(out), allocatable inverse_k,
logical, intent(out) used_fft,
integer, intent(out) info )

Transform and invert already projected real-space lattice blocks.

Parameters
blockstranslation-averaged real-space blocks
lattice_dimsnumber of replicated cells in every lattice direction
inverse_kinverse Hermitian operator block at every reciprocal-grid point
used_fftreports whether construction used the FFT path
infozero on success; otherwise the failing Cholesky factorization index

Definition at line 130 of file lattice_preconditioner_operator.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_lattice_local_correction()

subroutine, public lattice_preconditioner_operator::build_lattice_local_correction ( real(kind=dp), dimension(:, :), intent(in) operator_matrix,
integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) local_cell_count,
integer, dimension(:), intent(out), allocatable correction_indices,
real(kind=dp), dimension(:, :), intent(out), allocatable operator_columns,
real(kind=dp), dimension(:, :), intent(out), allocatable coarse_inverse,
real(kind=dp), intent(out) corrected_projection_error,
integer, intent(out) info )

Build a balanced local correction for selected non-circulant cell blocks.

Parameters
operator_matrixdense SPD operator
lattice_dimsnumber of replicated cells in every lattice direction
local_cell_countnumber of cell blocks retained in the correction
correction_indicesselected global AO indices
operator_columnscolumns A U for the selected coordinate basis U
coarse_inverseinverse of U^T A U
corrected_projection_errorresidual projection error after removing selected rows/columns
infozero on success; otherwise the failing Cholesky factorization index

Definition at line 170 of file lattice_preconditioner_operator.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lattice_fft_cost_ratio()

pure real(kind=dp) function, public lattice_preconditioner_operator::lattice_fft_cost_ratio ( integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) block_size,
integer, intent(in) rhs_count,
integer, intent(in) num_pe )

Estimate lattice-FFT application work relative to a dense inverse application.

Parameters
lattice_dimsnumber of explicitly replicated cells
block_sizenumber of orbitals in the reference cell
rhs_countnumber of orbital columns transformed together
num_penumber of message-passing ranks sharing the operator
Returns
estimated lattice-to-dense work ratio

Definition at line 354 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ lattice_fft_storage_ratio()

pure real(kind=dp) function, public lattice_preconditioner_operator::lattice_fft_storage_ratio ( integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) operator_count )

Estimate reciprocal-block storage relative to one dense real operator.

Parameters
lattice_dimsnumber of explicitly replicated cells
operator_countnumber of distinct state-dependent reciprocal operators
Returns
estimated lattice-to-dense storage ratio

Definition at line 396 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ lattice_local_cost_ratio()

pure real(kind=dp) function, public lattice_preconditioner_operator::lattice_local_cost_ratio ( integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) local_cell_count )

Estimate balanced-local-correction work relative to a dense inverse application.

Parameters
lattice_dimsnumber of replicated cells
local_cell_countnumber of cell blocks retained in the correction
Returns
estimated correction-to-dense work ratio

Definition at line 416 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ lattice_local_storage_ratio()

pure real(kind=dp) function, public lattice_preconditioner_operator::lattice_local_storage_ratio ( integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) operator_count,
integer, intent(in) local_cell_count )

Estimate balanced-local-correction storage relative to one dense real operator.

Parameters
lattice_dimsnumber of replicated cells
operator_countnumber of distinct state-dependent local corrections
local_cell_countnumber of cell blocks retained in each correction
Returns
estimated correction-to-dense storage ratio

Definition at line 443 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ lattice_fft_auto_select()

pure logical function, public lattice_preconditioner_operator::lattice_fft_auto_select ( integer, dimension(3), intent(in) lattice_dims,
integer, intent(in) block_size,
integer, intent(in) rhs_count,
integer, intent(in) operator_count,
integer, intent(in) num_pe,
real(kind=dp), intent(in) projection_error,
logical, intent(in) used_fft,
integer, intent(in) info )

Conservative error-, work-, and storage-aware AUTO selector.

Parameters
lattice_dimsnumber of explicitly replicated cells
block_sizenumber of orbitals in the reference cell
rhs_countnumber of orbital columns transformed together
operator_countnumber of distinct reciprocal operators stored
num_penumber of message-passing ranks sharing the operator
projection_errorrelative Frobenius projection error
used_fftwhether construction used the FFT path
infozero when all projected Fourier blocks were positive definite
Returns
true when AUTO may use the lattice inverse

Definition at line 474 of file lattice_preconditioner_operator.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_lattice_inverse_dense()

subroutine, public lattice_preconditioner_operator::apply_lattice_inverse_dense ( complex(kind=dp), dimension(:, :, :), intent(in) inverse_k,
integer, dimension(3), intent(in) lattice_dims,
real(kind=dp), dimension(:, :), intent(in) matrix_in,
real(kind=dp), dimension(:, :), intent(out) matrix_out,
logical, intent(out) used_fft,
real(kind=dp), intent(out), optional imaginary_residual )

Apply inverse Fourier blocks to a dense cell-major real matrix.

Parameters
inverse_kinverse overlap blocks on a complete reciprocal grid
lattice_dimsnumber of replicated cells in every lattice direction
matrix_inmatrix to precondition
matrix_outpreconditioned matrix
used_fftreports whether both transforms used the FFT path
imaginary_residuallargest discarded imaginary component

Definition at line 504 of file lattice_preconditioner_operator.F.

Here is the caller graph for this function:

◆ apply_lattice_state_inverse_dense()

subroutine, public lattice_preconditioner_operator::apply_lattice_state_inverse_dense ( complex(kind=dp), dimension(:, :, :, :), intent(in) inverse_k,
integer, dimension(3), intent(in) lattice_dims,
real(kind=dp), dimension(:, :), intent(in) matrix_in,
real(kind=dp), dimension(:, :), intent(out) matrix_out,
logical, intent(out) used_fft,
real(kind=dp), intent(out), optional imaginary_residual,
integer, dimension(:), intent(in), optional state_indices )

Apply one inverse Fourier operator to every column of a dense real matrix.

Parameters
inverse_kstate-dependent inverse blocks on a complete reciprocal grid
lattice_dimsnumber of replicated cells in every lattice direction
matrix_inmatrix to precondition, with one state per column
matrix_outpreconditioned matrix
used_fftreports whether both transforms used the FFT path
imaginary_residuallargest discarded imaginary component
state_indicesoptional global operator index for every input column

Definition at line 564 of file lattice_preconditioner_operator.F.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ lattice_fft_auto_min_cells

integer, parameter, public lattice_preconditioner_operator::lattice_fft_auto_min_cells = 8

Definition at line 29 of file lattice_preconditioner_operator.F.

◆ lattice_fft_auto_max_error

real(kind=dp), parameter, public lattice_preconditioner_operator::lattice_fft_auto_max_error = 1.0E-3_dp

Definition at line 30 of file lattice_preconditioner_operator.F.

◆ lattice_fft_auto_max_cost_ratio

real(kind=dp), parameter, public lattice_preconditioner_operator::lattice_fft_auto_max_cost_ratio = 0.8_dp

Definition at line 31 of file lattice_preconditioner_operator.F.

◆ lattice_fft_auto_max_storage_ratio

real(kind=dp), parameter, public lattice_preconditioner_operator::lattice_fft_auto_max_storage_ratio = 4.0_dp

Definition at line 32 of file lattice_preconditioner_operator.F.