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] committed Sep 19, 2024
1 parent 7c08553 commit e04e0a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion source/module_hamilt_general/module_xc/test/test_xc3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ class XCTest_GRADWFC : public XCTest
rhopw.nrxx = 5;
rhopw.nks = 1;
gcar_wrapper = new ModuleBase::Vector3<double>[rhopw.npwk_max];
for (int ii = 0; ii < rhopw.npwk_max; ii++)
for (int ii = 0; ii < rhopw.npwk_max; ii++) {
gcar_wrapper[ii] = ModuleBase::Vector3<double>(0,0,0);
}
kvec_c_wrapper = new ModuleBase::Vector3<double>(1,2,3);

rhopw.gcar = gcar_wrapper;
Expand Down
24 changes: 16 additions & 8 deletions source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ void Stress_Func<FPTYPE, Device>::get_dvnl1(ModuleBase::ComplexMatrix& vkb,
Structure_Factor* p_sf,
ModulePW::PW_Basis_K* wfc_basis)
{
if (PARAM.inp.test_pp)
if (PARAM.inp.test_pp) {
ModuleBase::TITLE("Stress_Func", "get_dvnl1");
}

const int npw = wfc_basis->npwk[ik];
const int lmaxkb = nlpp->lmaxkb;
Expand Down Expand Up @@ -144,19 +145,22 @@ void Stress_Func<FPTYPE, Device>::get_dvnl1(ModuleBase::ComplexMatrix& vkb,
int jkb = 0;
for (int it = 0; it < this->ucell->ntype; it++)
{
if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("it", it);
}
// calculate beta in G-space using an interpolation table
const int nbeta = this->ucell->atoms[it].ncpp.nbeta;
const int nh = this->ucell->atoms[it].ncpp.nh;

if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("nbeta", nbeta);
}

for (int nb = 0; nb < nbeta; nb++)
{
if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("ib", nb);
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
Expand Down Expand Up @@ -227,8 +231,9 @@ void Stress_Func<FPTYPE, Device>::get_dvnl2(ModuleBase::ComplexMatrix& vkb,
Structure_Factor* p_sf,
ModulePW::PW_Basis_K* wfc_basis)
{
if (PARAM.inp.test_pp)
if (PARAM.inp.test_pp) {
ModuleBase::TITLE("Stress", "get_dvnl2");
}
// ModuleBase::timer::tick("Stress","get_dvnl2");
const int npw = wfc_basis->npwk[ik];
const int lmaxkb = nlpp->lmaxkb;
Expand Down Expand Up @@ -259,19 +264,22 @@ void Stress_Func<FPTYPE, Device>::get_dvnl2(ModuleBase::ComplexMatrix& vkb,
int jkb = 0;
for (int it = 0; it < this->ucell->ntype; it++)
{
if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("it", it);
}
// calculate beta in G-space using an interpolation table
const int nbeta = this->ucell->atoms[it].ncpp.nbeta;
const int nh = this->ucell->atoms[it].ncpp.nh;

if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("nbeta", nbeta);
}

for (int nb = 0; nb < nbeta; nb++)
{
if (PARAM.inp.test_pp > 1)
if (PARAM.inp.test_pp > 1) {
ModuleBase::GlobalFunc::OUT("ib", nb);
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
Expand Down

0 comments on commit e04e0a9

Please sign in to comment.