Skip to content

Commit 835c1ea

Browse files
committed
fix doxgen & typos; leave input interface for further discussion
1 parent a871050 commit 835c1ea

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

source/module_hsolver/hsolver_pw.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void HSolverPW<T, Device>::call_paw_cell_set_currentk(const int ik)
9696
}
9797

9898
template <typename T, typename Device>
99-
void HSolverPW<T, Device>::paw_func_after_kloop(psi::Psi<T>& psi,
99+
void HSolverPW<T, Device>::paw_func_after_kloop(psi::Psi<T, Device>& psi,
100100
elecstate::ElecState* pes,
101101
const double tpiba,
102102
const int nat)
@@ -689,11 +689,13 @@ void HSolverPW<T, Device>::build_k_neighbors() {
689689
k_order.clear();
690690
k_order.reserve(nk);
691691

692-
// Store k-points and corresponding indices
692+
/**
693+
* @brief Structure representing a K-point with its vector, index, and norm.
694+
*/
693695
struct KPoint {
694-
ModuleBase::Vector3<double> kvec;
695-
int index;
696-
double norm;
696+
ModuleBase::Vector3<double> kvec; ///< K-vector of the K-point.
697+
int index; ///< Index of the K-point.
698+
double norm; ///< Norm of the K-vector.
697699

698700
KPoint(const ModuleBase::Vector3<double>& v, int i) :
699701
kvec(v), index(i), norm(v.norm()) {}
@@ -744,7 +746,9 @@ void HSolverPW<T, Device>::propagate_psi(psi::Psi<T, Device>& psi, const int fro
744746
// Get k-point difference
745747
ModuleBase::Vector3<double> dk = kvecs_c[to_ik] - kvecs_c[from_ik];
746748

747-
// Allocate porter locally
749+
/**
750+
* @brief Allocates memory for the porter used in FFT operations.
751+
*/
748752
T* porter = nullptr;
749753
resmem_complex_op()(this->ctx, porter, this->wfc_basis->nmaxgr, "HSolverPW::porter");
750754

source/module_hsolver/hsolver_pw.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,38 @@ class HSolverPW
107107
#endif
108108

109109
// K-point continuity related members
110+
/**
111+
* @brief Indicates whether to use K-point continuity.
112+
*/
110113
bool use_k_continuity = true;
114+
115+
/**
116+
* @brief Order of K-points.
117+
*/
111118
std::vector<int> k_order;
119+
120+
/**
121+
* @brief Parent-child relationships for K-points.
122+
*/
112123
std::unordered_map<int, int> k_parent;
124+
125+
/**
126+
* @brief K-vectors for K-points in continuous space.
127+
*/
113128
std::vector<ModuleBase::Vector3<double>> kvecs_c;
114129

130+
/**
131+
* @brief Builds the K-neighbors for the K-points.
132+
*/
115133
void build_k_neighbors();
134+
135+
/**
136+
* @brief Propagates the wave function from one K-point to another.
137+
*
138+
* @param psi The wave function object.
139+
* @param from_ik The index of the starting K-point.
140+
* @param to_ik The index of the target K-point.
141+
*/
116142
void propagate_psi(psi::Psi<T, Device>& psi, const int from_ik, const int to_ik);
117143
};
118144

0 commit comments

Comments
 (0)