Skip to content

Commit 16a5348

Browse files
committed
Merge branch 'develop' of https://github.com/deepmodeling/abacus-develop into debug
2 parents e3e57df + 8f6f4c7 commit 16a5348

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

source/src_lcao/FORCE_gamma_vl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void Force_LCAO_gamma::cal_fvl_dphi(
2323
GlobalC::pot.vr_eff1[ir] = GlobalC::pot.vr_eff(GlobalV::CURRENT_SPIN, ir);
2424
}
2525

26-
this->UHM->GG.cal_force(DM_in[is], GlobalC::pot.vr_eff1, fvl_dphi, svl_dphi, isforce, isstress);
26+
this->UHM->GG.cal_force(DM_in, GlobalC::pot.vr_eff1, fvl_dphi, svl_dphi, isforce, isstress);
2727
}
2828

2929
if(isstress)

source/src_lcao/gint_gamma.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Gint_Gamma
3333
double cal_rho(double*** DM_in);
3434

3535
// (3) calcualte the forces related to grid
36-
void cal_force(double** DM_in, const double*const vlocal,
36+
void cal_force(double*** DM_in, const double*const vlocal,
3737
ModuleBase::matrix& force, ModuleBase::matrix& stress,
3838
const bool is_force, const bool is_stress);
3939

@@ -112,8 +112,7 @@ class Gint_Gamma
112112

113113
// for calculatin of < dphi_i | Vlocal | phi_j > for foce calculation
114114
// on regular FFT real space grid.
115-
void gamma_force(const double*const vlocal) const;
116-
void gamma_force_new(const double*const*const DM, const double*const vlocal,
115+
void gamma_force(const double*const*const*const DM, const double*const vlocal,
117116
ModuleBase::matrix& force, ModuleBase::matrix& stress,
118117
const bool is_force, const bool is_stress);
119118

source/src_lcao/gint_gamma_fvl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
#include "global_fp.h" // mohan add 2021-01-30
1111

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,
1313
ModuleBase::matrix& force, ModuleBase::matrix& stress,
1414
const bool is_force, const bool is_stress)
1515
{
1616
ModuleBase::TITLE("Grid_Integral","cal_force_new");
1717
ModuleBase::timer::tick("Gint_Gamma","cal_force_new");
1818
if(!is_force && !is_stress) return;
1919
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);
2121

2222
ModuleBase::timer::tick("Gint_Gamma","cal_force_new");
2323
}
2424

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,
2626
ModuleBase::matrix& force, ModuleBase::matrix& stress,
2727
const bool is_force, const bool is_stress)
2828
{
@@ -88,7 +88,7 @@ void Gint_Gamma::gamma_force_new(const double*const*const DM, const double*const
8888

8989
double *vldr3 = Gint_Tools::get_vldr3(vlocal, ncyz, ibx, jby, kbz, this->vfactor);
9090
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]);
9292

9393
if(is_force)
9494
{

0 commit comments

Comments
 (0)