Skip to content

Commit

Permalink
Changed the criterion to detect the multiplicity.
Browse files Browse the repository at this point in the history
The issue #1 was cured slightly, but not perfectly
  • Loading branch information
ttadano committed Nov 19, 2017
1 parent dac5dd7 commit 761555d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anphon/dynamical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void Dynamical::prepare_mindist_list(std::vector<int> **mindist_out)

dist_min = distall[i][j][0].dist;
for (auto it = distall[i][j].cbegin(); it != distall[i][j].cend(); ++it) {
if (std::abs((*it).dist - dist_min) < eps8) {
if (std::abs((*it).dist - dist_min) < 1.0e-3) {
mindist_out[i][j].push_back((*it).cell);
}
}
Expand Down
2 changes: 1 addition & 1 deletion anphon/ewald.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void Ewald::get_pairs_of_minimum_distance(const int nat, const int nsize[3], dou
it != distall_ewald[iat][jat].end(); ++ it) {
if (it == distall_ewald[iat][jat].begin()) dist_hold = (*it).dist;
dist_tmp = (*it).dist;
if (std::abs(dist_tmp - dist_hold) < eps8) multiplicity[iat][jat] += 1;
if (std::abs(dist_tmp - dist_hold) < 1.0e-3) multiplicity[iat][jat] += 1;
}

}
Expand Down

0 comments on commit 761555d

Please sign in to comment.