Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Aug 23, 2024
1 parent cab05db commit e91428a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/module_hamilt_lcao/module_deltaspin/spin_constrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,15 @@ 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 e91428a

Please sign in to comment.