(git:936074a)
Loading...
Searching...
No Matches
kpoint_k_r_trafo_simple Module Reference

Implements transformations from k-space to R-space for Fortran array matrices. More...

Functions/Subroutines

subroutine, public replicate_rs_matrices (rs_dbcsr_in, kpoint_in, rs_array_out, cell_to_index_out)
 Convert dbcsr matrices representing operators in real-space image cells to arrays.
 
subroutine, public rs_to_kp (rs_real, ks_complex, index_to_cell, xkp, deriv_direction, hmat)
 Integrate RS matrices (stored as Fortran array) into a kpoint matrix at given kp.
 
subroutine, public fm_rs_to_kp (cfm_kp, fm_rs, kpoints, ikp)
 Transforms array of fm RS matrices into cfm k-space matrix, at given kpoint index.
 
subroutine, public add_kp_to_all_rs (array_kp, array_rs, kpoints, ikp, index_to_cell_ext)
 Adds given kpoint matrix to all rs matrices.
 
subroutine, public fm_add_kp_to_all_rs (cfm_kp, fm_rs, kpoints, ikp)
 Adds given kpoint matrix to a single rs matrix.
 
subroutine, public add_kp_to_rs (array_kp, array_rs, cell, kpoints, ikp)
 Adds given kpoint matrix to a single rs matrix.
 

Detailed Description

Implements transformations from k-space to R-space for Fortran array matrices.

Note
This code is less performant/more memory consuming than the methods in kpoint_methods.F Use only when transformations are not the computational bottleneck.
History
11.2025 created [Stepan Marek]
Author
Stepan Marek

Function/Subroutine Documentation

◆ replicate_rs_matrices()

subroutine, public kpoint_k_r_trafo_simple::replicate_rs_matrices ( type(dbcsr_p_type), dimension(:, :), pointer  rs_dbcsr_in,
type(kpoint_type), pointer  kpoint_in,
real(kind=dp), dimension(:, :, :, :)  rs_array_out,
integer, dimension(:, :, :), pointer  cell_to_index_out 
)

Convert dbcsr matrices representing operators in real-space image cells to arrays.

Parameters
rs_dbcsr_inArray of dbcsr matrices
kpoint_inThe kpoint environment of the source matrix (providing neighbor list and cell_to_index)
rs_array_outMultidimensional array - matrices are duplicated on each MPI rank dim 1 : spin, dim 2 : rows, dim 3 : cols, dim 4 : image index
cell_to_index_outCell to index array for the destination array
Date
11.2025
Author
Stepan Marek

Definition at line 61 of file kpoint_k_r_trafo_simple.F.

Here is the call graph for this function:

◆ rs_to_kp()

subroutine, public kpoint_k_r_trafo_simple::rs_to_kp ( real(kind=dp), dimension(:, :, :), intent(in)  rs_real,
complex(kind=dp), dimension(:, :), intent(out)  ks_complex,
integer, dimension(:, :), pointer  index_to_cell,
real(kind=dp), dimension(3), intent(in)  xkp,
integer, intent(in), optional  deriv_direction,
real(kind=dp), dimension(3, 3), intent(in), optional  hmat 
)

Integrate RS matrices (stored as Fortran array) into a kpoint matrix at given kp.

Parameters
rs_realMultidimensional array of real parts of the matrix, dim 1 : rows, dim 2 : cols, dim 3 : image index
ks_complexTarget complex k-space matrix
index_to_cellGets the image cell coordinates from the rs_dbcsr index
xkpSingle kpoint where the transformation is evalued at
deriv_directionDerivative direction - indicates along which cartesian direction to take the derivative
hmatCell size matrix, required for the derivative
Date
11.2025
Author
Stepan Marek

Definition at line 229 of file kpoint_k_r_trafo_simple.F.

Here is the caller graph for this function:

◆ fm_rs_to_kp()

subroutine, public kpoint_k_r_trafo_simple::fm_rs_to_kp ( type(cp_cfm_type cfm_kp,
type(cp_fm_type), dimension(:)  fm_rs,
type(kpoint_type), pointer  kpoints,
integer  ikp 
)

Transforms array of fm RS matrices into cfm k-space matrix, at given kpoint index.

Parameters
cfm_kpThe resulting complex fm matrix, containing the k-space matrix elements
fm_rsThe real space matrix array
kpointsStructure containing information about number, positions, weights etc. of kpoints
ikpIndex of the target kpoint at which the transformation is evaluated
History
05.2024 Created [Jan Wilhelm] 11.2025 Moved to general file [Stepan Marek]

Definition at line 268 of file kpoint_k_r_trafo_simple.F.

Here is the caller graph for this function:

◆ add_kp_to_all_rs()

subroutine, public kpoint_k_r_trafo_simple::add_kp_to_all_rs ( complex(kind=dp), dimension(:, :)  array_kp,
real(kind=dp), dimension(:, :, :)  array_rs,
type(kpoint_type), pointer  kpoints,
integer  ikp,
integer, dimension(:, :), optional, pointer  index_to_cell_ext 
)

Adds given kpoint matrix to all rs matrices.

Parameters
array_kpInput k-space matrix array
array_rsOutput rs arrays
kpointsStructure containing information about number, positions, weights etc. of kpoints
ikpIndex of the target kpoint at which the transformation is evaluated
index_to_cell_extExternal supplied index_to_cell
History
05.2024 Created [Jan Wilhelm] 11.2025 Moved to general file [Stepan Marek]
Note
Part of transform in parallelism over k-points (hence why not for a single rs cell)

Definition at line 358 of file kpoint_k_r_trafo_simple.F.

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

◆ fm_add_kp_to_all_rs()

subroutine, public kpoint_k_r_trafo_simple::fm_add_kp_to_all_rs ( type(cp_cfm_type cfm_kp,
type(cp_fm_type), dimension(:)  fm_rs,
type(kpoint_type), pointer  kpoints,
integer  ikp 
)

Adds given kpoint matrix to a single rs matrix.

Parameters
cfm_kpThe input complex fm matrix, containing the k-space matrix elements
fm_rsThe real space matrix array
kpointsStructure containing information about number, positions, weights etc. of kpoints
ikpIndex of the target kpoint at which the transformation is evaluated
History
05.2024 Created [Jan Wilhelm] 11.2025 Moved to general file [Stepan Marek]
Note
Part of transform in parallelism over k-points (hence why not for a single rs cell)

Definition at line 397 of file kpoint_k_r_trafo_simple.F.

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

◆ add_kp_to_rs()

subroutine, public kpoint_k_r_trafo_simple::add_kp_to_rs ( complex(kind=dp), dimension(:, :)  array_kp,
real(kind=dp), dimension(:, :)  array_rs,
integer, dimension(3)  cell,
type(kpoint_type), pointer  kpoints,
integer  ikp 
)

Adds given kpoint matrix to a single rs matrix.

Parameters
array_kpThe resulting complex fm matrix, containing the k-space matrix elements
array_rsThe real space matrix array
cellThe image cell of the target RS matrix
kpointsStructure containing information about number, positions, weights etc. of kpoints
ikpIndex of the target kpoint at which the transformation is evaluated
History
05.2024 Created [Jan Wilhelm] 11.2025 Moved to general file [Stepan Marek]
Note
Part of transform in parallelism over k-points (hence why not for a single rs cell)

Definition at line 431 of file kpoint_k_r_trafo_simple.F.

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