Skip to content

Commit 861c6bf

Browse files
committed
Update spsi docs
1 parent 8002aeb commit 861c6bf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

source/module_hsolver/diago_david.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,20 @@ class DiagoDavid : public DiagH<T, Device>
5353

5454
/**
5555
* @brief A function type representing the SX function.
56+
*
57+
* nrow is leading dimension of spsi, npw is leading dimension of psi, nbands is number of vecs
5658
*
5759
* This function type is used to define a matrix-blockvector operator S.
5860
* For generalized eigenvalue problem HX = λSX,
5961
* this function computes the product of the overlap matrix S and a blockvector X.
6062
*
6163
* @param[in] X Pointer to the input blockvector.
6264
* @param[out] SX Pointer to the output blockvector.
63-
* @param[in] nrow Dimension of SX: nbands * nrow.
64-
* @param[in] npw Number of plane waves.
65-
* @param[in] nbands Number of bands.
65+
* @param[in] nrow Leading dimension of spsi. Dimension of SX: nbands * nrow.
66+
* @param[in] npw Leading dimension of psi. Number of plane waves.
67+
* @param[in] nbands Number of vectors.
6668
*
67-
* @note called as spsi(in, out, dim, dim, 1)
69+
* @note called like spsi(in, out, dim, dim, 1)
6870
*/
6971
using SPsiFunc = std::function<void(T*, T*, const int, const int, const int)>;
7072

source/module_hsolver/hsolver_pw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
512512

513513
/// wrap spsi into lambda function, Matrix \times blockvector
514514
/// spsi(X, SX, nrow, npw, nbands)
515+
/// nrow is leading dimension of spsi, npw is leading dimension of psi, nbands is number of vecs
515516
auto spsi_func = [hm](const T* psi_in, T* spsi_out,
516517
const int nrow, // dimension of spsi: nbands * nrow
517518
const int npw, // number of plane waves

0 commit comments

Comments
 (0)