Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/module_cell/klist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ void K_Vectors::ibz_kpoint(const ModuleSymmetry::Symmetry& symm,
std::vector<int> ibz2bz(this->nkstot);

// nkstot is the total input k-points number.
const double weight = 1.0 / static_cast<double>(nkstot);
double weight = 1.0 / static_cast<double>(nkstot);

ModuleBase::Vector3<double> kvec_rot;
ModuleBase::Vector3<double> kvec_rot_k;
Expand Down Expand Up @@ -822,6 +822,8 @@ void K_Vectors::ibz_kpoint(const ModuleSymmetry::Symmetry& symm,
// search in all k-poins.
for (int i = 0; i < nkstot; ++i)
{
if (!is_mp) { weight = wk[i]; } // use the input weight, instead of 1/nkstot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug? It would be better to add an integrate test.


// restrict to [0, 1)
restrict_kpt(kvec_d[i]);

Expand Down
Loading