Skip to content

Commit

Permalink
Revert "[pre-commit.ci lite] apply automatic fixes"
Browse files Browse the repository at this point in the history
This reverts commit e91428a.
  • Loading branch information
haozhihan committed Aug 29, 2024
1 parent f5d4560 commit 522c4a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,12 @@ void SpinConstrain<FPTYPE, Device>::set_target_mag()
mag.x = element_data.target_mag_val * std::sin(radian_angle1) * std::cos(radian_angle2);
mag.y = element_data.target_mag_val * std::sin(radian_angle1) * std::sin(radian_angle2);
mag.z = element_data.target_mag_val * std::cos(radian_angle1);
if (std::abs(mag.x) < 1e-14) {
if (std::abs(mag.x) < 1e-14)
mag.x = 0.0;
}
if (std::abs(mag.y) < 1e-14) {
if (std::abs(mag.y) < 1e-14)
mag.y = 0.0;
}
if (std::abs(mag.z) < 1e-14) {
if (std::abs(mag.z) < 1e-14)
mag.z = 0.0;
}
}
this->target_mag_[iat] = mag;
}
Expand Down

0 comments on commit 522c4a5

Please sign in to comment.