diff --git a/source/module_hamilt_general/module_xc/test/test_xc3.cpp b/source/module_hamilt_general/module_xc/test/test_xc3.cpp index cc59416819..3b859d2969 100644 --- a/source/module_hamilt_general/module_xc/test/test_xc3.cpp +++ b/source/module_hamilt_general/module_xc/test/test_xc3.cpp @@ -172,8 +172,9 @@ class XCTest_GRADWFC : public XCTest rhopw.nrxx = 5; rhopw.nks = 1; gcar_wrapper = new ModuleBase::Vector3[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(0,0,0); +} kvec_c_wrapper = new ModuleBase::Vector3(1,2,3); rhopw.gcar = gcar_wrapper; diff --git a/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp b/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp index e47ab65e46..d3cbb06885 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/stress_func_nl.cpp @@ -110,8 +110,9 @@ void Stress_Func::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; @@ -144,19 +145,22 @@ void Stress_Func::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 @@ -227,8 +231,9 @@ void Stress_Func::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; @@ -259,19 +264,22 @@ void Stress_Func::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