Skip to content

Commit ca5cc95

Browse files
authored
Fix docs according to #5133 (#5169)
1 parent b8b3829 commit ca5cc95

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

source/module_hsolver/diago_david.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,19 @@ class DiagoDavid : public DiagH<T, Device>
3030

3131
// declare type of matrix-blockvector functions.
3232
// the function type is defined as a std::function object.
33-
// notice that hpsi and spsi functions require
34-
// !different! order of input and output blockvectors.
3533
/**
3634
* @brief A function type representing the HX function.
3735
*
3836
* This function type is used to define a matrix-blockvector operator H.
3937
* For eigenvalue problem HX = λX or generalized eigenvalue problem HX = λSX,
4038
* this function computes the product of the Hamiltonian matrix H and a blockvector X.
4139
*
42-
* @param[out] X Pointer to input blockvector of type `T*`.
43-
* @param[in] HX Pointer to output blockvector of type `T*`.
44-
* @param[in] neig Number of eigebpairs required.
45-
* @param[in] dim Dimension of matrix.
46-
* @param[in] id_start Start index of blockvector.
47-
* @param[in] id_end End index of blockvector.
40+
* @param[out] X Pointer to input blockvector of type `T*`.
41+
* @param[in] HX Pointer to output blockvector of type `T*`.
42+
* @param[in] nvec Number of eigebpairs, i.e. number of vectors in a block.
43+
* @param[in] dim Dimension of matrix.
44+
* @param[in] id_start Start index of blockvector.
45+
* @param[in] id_end End index of blockvector.
4846
*/
4947
using HPsiFunc = std::function<void(T*, T*, const int, const int, const int, const int)>;
5048

@@ -60,6 +58,8 @@ class DiagoDavid : public DiagH<T, Device>
6058
* @param[in] nrow Dimension of SX: nbands * nrow.
6159
* @param[in] npw Number of plane waves.
6260
* @param[in] nbands Number of bands.
61+
*
62+
* @note called as spsi(in, out, dim, dim, 1)
6363
*/
6464
using SPsiFunc = std::function<void(T*, T*, const int, const int, const int)>;
6565

source/module_hsolver/hsolver_pw.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
323323

324324
if (this->method == "cg")
325325
{
326-
// warp the subspace_func into a lambda function
326+
// wrap the subspace_func into a lambda function
327327
auto ngk_pointer = psi.get_ngk_pointer();
328328
auto subspace_func = [hm, ngk_pointer](const ct::Tensor& psi_in, ct::Tensor& psi_out) {
329329
// psi_in should be a 2D tensor:
@@ -355,10 +355,10 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
355355
this->diag_iter_max,
356356
this->nproc_in_pool);
357357

358-
// warp the hpsi_func and spsi_func into a lambda function
358+
// wrap the hpsi_func and spsi_func into a lambda function
359359
using ct_Device = typename ct::PsiToContainer<Device>::type;
360360

361-
// warp the hpsi_func and spsi_func into a lambda function
361+
// wrap the hpsi_func and spsi_func into a lambda function
362362
auto hpsi_func = [hm, ngk_pointer](const ct::Tensor& psi_in, ct::Tensor& hpsi_out) {
363363
ModuleBase::timer::tick("DiagoCG_New", "hpsi_func");
364364
// psi_in should be a 2D tensor:

0 commit comments

Comments
 (0)