(git:f824184)
Loading...
Searching...
No Matches
cp_cfm_diag Module Reference

used for collecting diagonalization schemes available for cp_cfm_type More...

Data Types

type  cp_cfm_diag_workspace_type

Functions/Subroutines

subroutine, public cp_cfm_heevd (matrix, eigenvectors, eigenvalues)
 Perform a diagonalisation of a complex matrix.
subroutine, public cp_cfm_power (matrix, work, exponent, threshold, n_dependent, verbose, eigvals)
 Raise the positive spectral part of a Hermitian matrix to a real power. Eigenmodes with eigenvalues below the nonnegative threshold, and all non-positive eigenvalues, are discarded. This routine does not implement a general matrix power for indefinite Hermitian matrices.
subroutine, public cp_cfm_geeig (amatrix, bmatrix, eigenvectors, eigenvalues, work, lowest_subset)
 General Eigenvalue Problem AX = BXE Single option version: Cholesky decomposition of B.
subroutine, public cp_cfm_geeig_canon (amatrix, bmatrix, eigenvectors, eigenvalues, work, epseig, nmo_retained)
 General Eigenvalue Problem AX = BXE Use canonical orthogonalization.
subroutine, public cp_cfm_geeig_local (amatrix, bmatrix, eigenvectors, eigenvalues, ws)
 Solve a generalized complex eigenproblem using the local LAPACK backend. This routine is restricted to a one-rank BLACS grid. It deliberately avoids ScaLAPACK so independent k-points can be evaluated concurrently without making overlapping MPI calls from OpenMP worker threads.
subroutine, public cp_cfm_geeig_canon_local (amatrix, bmatrix, eigenvectors, eigenvalues, work, epseig, ws)
 Canonical generalized complex diagonalization on a one-rank BLACS grid.
subroutine, public cp_cfm_heevd_local (matrix, vectors, info, ws)
 Local LAPACK ZHEEVD with prepared scratch, without allocation or communication.
subroutine, public cp_cfm_local_workspace_prepare (ws, n, a, b)
 Query LAPACK once per matrix order/solver and retain private scratch across k points.

Detailed Description

used for collecting diagonalization schemes available for cp_cfm_type

Note
first version : only one routine right now
Author
Joost VandeVondele (2003-09)

Function/Subroutine Documentation

◆ cp_cfm_heevd()

subroutine, public cp_cfm_diag::cp_cfm_heevd ( type(cp_cfm_type), intent(in) matrix,
type(cp_cfm_type), intent(in) eigenvectors,
real(kind=dp), dimension(:), intent(out) eigenvalues )

Perform a diagonalisation of a complex matrix.

Parameters
matrix...
eigenvectors...
eigenvalues...
History
12.2024 Added DLA-Future support [Rocco Meli] 08.2026 Added ELPA support
Author
Joost VandeVondele

Definition at line 93 of file cp_cfm_diag.F.

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

◆ cp_cfm_power()

subroutine, public cp_cfm_diag::cp_cfm_power ( type(cp_cfm_type), intent(inout) matrix,
type(cp_cfm_type), intent(inout), optional, target work,
real(kind=dp), intent(in) exponent,
real(kind=dp), intent(in) threshold,
integer, intent(out), optional n_dependent,
logical, intent(in), optional verbose,
real(kind=dp), dimension(2), intent(out), optional eigvals )

Raise the positive spectral part of a Hermitian matrix to a real power. Eigenmodes with eigenvalues below the nonnegative threshold, and all non-positive eigenvalues, are discarded. This routine does not implement a general matrix power for indefinite Hermitian matrices.

Parameters
matrixinput/output matrix; its upper triangle defines the Hermitian input
workoptional scratch matrix with the same size and distribution as matrix; must not alias matrix; overwritten during reconstruction; allocated internally when omitted
exponentmatrix exponent
thresholdnonnegative lower bound for retained eigenvalues
n_dependentoptional number of discarded eigenvalues
verboseoptional flag to print spectral diagnostics (default false)
eigvalsoptional smallest and largest eigenvalues before filtering

Definition at line 238 of file cp_cfm_diag.F.

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

◆ cp_cfm_geeig()

subroutine, public cp_cfm_diag::cp_cfm_geeig ( type(cp_cfm_type), intent(in) amatrix,
type(cp_cfm_type), intent(in) bmatrix,
type(cp_cfm_type), intent(in) eigenvectors,
real(kind=dp), dimension(:) eigenvalues,
type(cp_cfm_type), intent(in) work,
logical, intent(in), optional lowest_subset )

General Eigenvalue Problem AX = BXE Single option version: Cholesky decomposition of B.

Parameters
amatrix...
bmatrix...
eigenvectors...
eigenvalues...
work...
lowest_subsetcompute only the requested lowest eigenpairs with ScaLAPACK when available
History
12.2024 Added DLA-Future support [Rocco Meli]

Definition at line 438 of file cp_cfm_diag.F.

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

◆ cp_cfm_geeig_canon()

subroutine, public cp_cfm_diag::cp_cfm_geeig_canon ( type(cp_cfm_type), intent(inout) amatrix,
type(cp_cfm_type), intent(inout) bmatrix,
type(cp_cfm_type), intent(inout) eigenvectors,
real(kind=dp), dimension(:), intent(out) eigenvalues,
type(cp_cfm_type), intent(inout) work,
real(kind=dp), intent(in) epseig,
integer, intent(out), optional nmo_retained )

General Eigenvalue Problem AX = BXE Use canonical orthogonalization.

Parameters
amatrix...
bmatrix...
eigenvectors...
eigenvalues...
work...
epseig...
nmo_retained...

Definition at line 684 of file cp_cfm_diag.F.

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

◆ cp_cfm_geeig_local()

subroutine, public cp_cfm_diag::cp_cfm_geeig_local ( type(cp_cfm_type), intent(in) amatrix,
type(cp_cfm_type), intent(in) bmatrix,
type(cp_cfm_type), intent(in) eigenvectors,
real(kind=dp), dimension(:), intent(out) eigenvalues,
type(cp_cfm_diag_workspace_type), intent(inout) ws )

Solve a generalized complex eigenproblem using the local LAPACK backend. This routine is restricted to a one-rank BLACS grid. It deliberately avoids ScaLAPACK so independent k-points can be evaluated concurrently without making overlapping MPI calls from OpenMP worker threads.

Parameters
amatrixHamiltonian, overwritten
bmatrixoverlap matrix, overwritten
eigenvectorseigenvectors
eigenvalueseigenvalues
wsreusable private LAPACK scratch

Definition at line 776 of file cp_cfm_diag.F.

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

◆ cp_cfm_geeig_canon_local()

subroutine, public cp_cfm_diag::cp_cfm_geeig_canon_local ( type(cp_cfm_type), intent(in) amatrix,
type(cp_cfm_type), intent(in) bmatrix,
type(cp_cfm_type), intent(in) eigenvectors,
real(kind=dp), dimension(:), intent(out) eigenvalues,
type(cp_cfm_type), intent(in) work,
real(kind=dp), intent(in) epseig,
type(cp_cfm_diag_workspace_type), intent(inout) ws )

Canonical generalized complex diagonalization on a one-rank BLACS grid.

Parameters
amatrixHamiltonian, overwritten
bmatrixoverlap matrix, overwritten and used as work storage
eigenvectorseigenvectors
eigenvalueseigenvalues
workwork matrix
epseigoverlap eigenvalue threshold
wsreusable private LAPACK scratch

Definition at line 831 of file cp_cfm_diag.F.

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

◆ cp_cfm_heevd_local()

subroutine, public cp_cfm_diag::cp_cfm_heevd_local ( complex(kind=dp), dimension(:, :), intent(inout) matrix,
complex(kind=dp), dimension(:, :), intent(inout), optional vectors,
integer, intent(out) info,
type(cp_cfm_diag_workspace_type), intent(inout) ws )

Local LAPACK ZHEEVD with prepared scratch, without allocation or communication.

Parameters
matrixinput matrix, overwritten by eigenvectors
vectorsoptional copy of the eigenvectors
info...
wsprepared private LAPACK scratch

Definition at line 909 of file cp_cfm_diag.F.

Here is the caller graph for this function:

◆ cp_cfm_local_workspace_prepare()

subroutine, public cp_cfm_diag::cp_cfm_local_workspace_prepare ( type(cp_cfm_diag_workspace_type), intent(inout) ws,
integer, intent(in) n,
complex(kind=dp), dimension(:, :), intent(inout) a,
complex(kind=dp), dimension(:, :), intent(inout), optional b )

Query LAPACK once per matrix order/solver and retain private scratch across k points.

Parameters
wscaller-owned workspace
nmatrix order
aquery matrix; workspace queries do not read its values
boptional overlap selects ZHEGVD; otherwise query ZHEEVD

Definition at line 942 of file cp_cfm_diag.F.

Here is the caller graph for this function: