|
9 | 9 |
|
10 | 10 | // calculate the Pulay term of mGGA stress correction in PW |
11 | 11 | template <typename FPTYPE, typename Device> |
12 | | -void Stress_Func<FPTYPE, Device>::stress_mgga(ModuleBase::matrix& sigma, |
| 12 | +void Stress_Func<FPTYPE, Device>::stress_mgga(const UnitCell& ucell, |
| 13 | + ModuleBase::matrix& sigma, |
13 | 14 | const ModuleBase::matrix& wg, |
14 | 15 | const ModuleBase::matrix& v_ofk, |
15 | 16 | const Charge* const chr, |
@@ -52,9 +53,9 @@ void Stress_Func<FPTYPE, Device>::stress_mgga(ModuleBase::matrix& sigma, |
52 | 53 |
|
53 | 54 | for (int ibnd = 0; ibnd < PARAM.inp.nbands; ibnd++) |
54 | 55 | { |
55 | | - const FPTYPE w1 = wg(ik, ibnd) / GlobalC::ucell.omega; |
| 56 | + const FPTYPE w1 = wg(ik, ibnd) / ucell.omega; |
56 | 57 | const std::complex<FPTYPE>* psi = &psi_in[0](ik, ibnd, 0); |
57 | | - XC_Functional::grad_wfc<std::complex<FPTYPE>, Device>(ik, GlobalC::ucell.tpiba, wfc_basis, psi, gradwfc.data<std::complex<FPTYPE>>()); |
| 58 | + XC_Functional::grad_wfc<std::complex<FPTYPE>, Device>(ik, ucell.tpiba, wfc_basis, psi, gradwfc.data<std::complex<FPTYPE>>()); |
58 | 59 | cal_stress_mgga_solver( |
59 | 60 | current_spin, nrxx, w1, gradwfc.data<std::complex<FPTYPE>>(), crosstaus.data<FPTYPE>()); |
60 | 61 | } // band loop |
|
0 commit comments