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 Nov 11, 2024
1 parent 659ee04 commit fd24fe2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/module_lr/utils/lr_util_hcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace LR_Util
auto dr_real = DMR_real.get_DMR_vector()[is];
assert(dr != nullptr);
assert(dr_real != nullptr);
for (int ia = 0;ia < nat;ia++)
for (int ia = 0;ia < nat;ia++) {
for (int ja = 0;ja < nat;ja++)
{
auto ap = dr->find_pair(ia, ja);
Expand All @@ -25,9 +25,11 @@ namespace LR_Util
auto dR = ap->get_R_index(iR);
auto ptr = ap->get_HR_values(iR).get_pointer();
auto ptr_real = ap_real->get_HR_values(dR.x, dR.y, dR.z).get_pointer();
for (int i = 0;i < ap->get_size();++i) ptr_real[i] = (get_imag ? ptr[i].imag() : ptr[i].real());
for (int i = 0;i < ap->get_size();++i) { ptr_real[i] = (get_imag ? ptr[i].imag() : ptr[i].real());
}
}
}
}
}
}

Expand All @@ -37,7 +39,7 @@ namespace LR_Util
const char& type)
{
bool get_imag = (type == 'I' || type == 'i');
for (int ia = 0;ia < nat;ia++)
for (int ia = 0;ia < nat;ia++) {
for (int ja = 0;ja < nat;ja++)
{
auto ap = HR.find_pair(ia, ja);
Expand All @@ -48,8 +50,10 @@ namespace LR_Util
auto dR = ap->get_R_index(iR);
auto ptr = ap->get_HR_values(iR).get_pointer();
auto ptr_real = ap_real->get_HR_values(dR.x, dR.y, dR.z).get_pointer();
for (int i = 0;i < ap->get_size();++i) get_imag ? ptr[i].imag(ptr_real[i]) : ptr[i].real(ptr_real[i]);
for (int i = 0;i < ap->get_size();++i) { get_imag ? ptr[i].imag(ptr_real[i]) : ptr[i].real(ptr_real[i]);
}
}
}
}
}
}

0 comments on commit fd24fe2

Please sign in to comment.