|
9 | 9 |
|
10 | 10 | #include "global_fp.h" // mohan add 2021-01-30 |
11 | 11 |
|
12 | | -void Gint_Gamma::cal_force(double** DM_in, const double*const vlocal, |
| 12 | +void Gint_Gamma::cal_force(double*** DM_in, const double*const vlocal, |
13 | 13 | ModuleBase::matrix& force, ModuleBase::matrix& stress, |
14 | 14 | const bool is_force, const bool is_stress) |
15 | 15 | { |
16 | 16 | ModuleBase::TITLE("Grid_Integral","cal_force_new"); |
17 | 17 | ModuleBase::timer::tick("Gint_Gamma","cal_force_new"); |
18 | 18 | if(!is_force && !is_stress) return; |
19 | 19 | this->save_atoms_on_grid(GlobalC::GridT); |
20 | | - this->gamma_force_new(DM_in, vlocal, force, stress, is_force, is_stress); |
| 20 | + this->gamma_force(DM_in, vlocal, force, stress, is_force, is_stress); |
21 | 21 |
|
22 | 22 | ModuleBase::timer::tick("Gint_Gamma","cal_force_new"); |
23 | 23 | } |
24 | 24 |
|
25 | | -void Gint_Gamma::gamma_force_new(const double*const*const DM, const double*const vlocal, |
| 25 | +void Gint_Gamma::gamma_force(const double*const*const*const DM, const double*const vlocal, |
26 | 26 | ModuleBase::matrix& force, ModuleBase::matrix& stress, |
27 | 27 | const bool is_force, const bool is_stress) |
28 | 28 | { |
@@ -88,7 +88,7 @@ void Gint_Gamma::gamma_force_new(const double*const*const DM, const double*const |
88 | 88 |
|
89 | 89 | double *vldr3 = Gint_Tools::get_vldr3(vlocal, ncyz, ibx, jby, kbz, this->vfactor); |
90 | 90 | const Gint_Tools::Array_Pool<double> psir_vlbr3 = Gint_Tools::get_psir_vlbr3(na_grid, LD_pool, block_index, cal_flag, vldr3, psir_ylm.ptr_2D); |
91 | | - const Gint_Tools::Array_Pool<double> psir_vlbr3_DM = Gint_Tools::get_psir_vlbr3_DM(na_grid, LD_pool, block_iw, block_size, block_index, cal_flag, psir_vlbr3.ptr_2D, DM); |
| 91 | + const Gint_Tools::Array_Pool<double> psir_vlbr3_DM = Gint_Tools::get_psir_vlbr3_DM(na_grid, LD_pool, block_iw, block_size, block_index, cal_flag, psir_vlbr3.ptr_2D, DM[GlobalV::CURRENT_SPIN]); |
92 | 92 |
|
93 | 93 | if(is_force) |
94 | 94 | { |
|
0 commit comments