|
| subroutine | qs_kpoint_operators::kpoint_operator_densify (rsmat, matrix_row, ik, xkp, cell_to_index, sab_nl, grid, use_grid, rmatrix, cmatrix, tmpmat, fm_re, fm_im) |
| | Transform one real-space operator to one k point and densify the result: the real part into fm_re and the imaginary part into fm_im. Densify means: copy the blocks of a DBCSR matrix into a full matrix. Stateless: fills caller-provided scratch.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_cfm_to_mo (cmat, mo_re, mo_im, eigenvalues) |
| | Split a complex matrix into the real and imaginary MO sets and copy the eigenvalues to the imaginary set.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_context_create (ctx, kpoints, ao_ao_fm, nspin) |
| | Create an empty operator context. The context owns no buffers after this call; they are created on first use and released with the context.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_context_release (ctx) |
| | Release the context together with every buffer it created. Call once, at the exit of the routine that created the context. Every started instance must be idle at this point. The call aborts when a transfer is still in flight, because nothing would ever wait for its MPI requests.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_start (ctx, ikp, ispin, rsmat, slot, grid, use_grid, matrix_row) |
| | Start the assembly of one operator for one local k point and spin and launch its transfers to every k-point group. The caller index ikp is local; the walk over groups happens here, so no caller can express a group-local loop. Finish every started instance with kpoint_operator_finish. The first start also creates the slot bookkeeping of the context. Collective over the environment-wide communicator: every rank must call the same sequence of service calls.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_finish (ctx, ikp, ispin, slot, cmat) |
| | Finish the transfers of one started instance: on the group that owns the k point, merge the received parts into cmat (real part first, overwrite then add); on every group, reclaim the send side. The slot returns to idle. Collective over the environment-wide communicator: every rank must call the same sequence of service calls.
|
| subroutine, public | qs_kpoint_operators::kpoint_operator_get (ctx, ikp, ispin, rsmat, cmat, fm_re, fm_im, mat_re, mat_im, matrix_row) |
| | Assemble one operator for one local k point and spin in one call: run the single-group transfer of the service for every group and finish it immediately, through transfer states local to this call. The persistent slot machinery stays with start and finish. Exactly one output flavor must be present: cmat receives the complex operator (real part overwrites, imaginary part adds) through the context buffer; the fm pair receives the two parts separately, transferred directly into fm_re and fm_im on the owning group (any distribution: the general copy redistributes); or the dbcsr pair receives the two parts as block-cyclic matrices built by the service, replacing the caller-side copy_fm_to_dbcsr_bc detour. The dbcsr matrices must be freshly initialized (dbcsr_init_p) and the cmat flavor must share the distribution of the k-point group. Collective over the environment-wide communicator: every rank must call the same sequence of service calls.
|