Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
83eb5d0
module_charge: normalize indentation and brace single-statement contr…
Sep 16, 2026
aa9e515
module_charge: aggregate Charge_Mixing params into MixingConfig
Sep 16, 2026
589e65f
module_charge: deduplicate twobeta_mix lambdas and replace raw new wi…
Sep 16, 2026
8246456
module_charge: move residual/inner-product globals into MixingConfig
Sep 16, 2026
ecf5084
module_charge: own Charge's _space_* storage with std::vector (Step 5a)
Sep 16, 2026
25bd441
module_charge: route chgmixing_ks through its inp parameter
Sep 16, 2026
1e9411c
module_charge: split Charge::init_rho into per-stage private methods
Sep 16, 2026
c4a8ed2
module_charge: extract Charge density math into charge_math free func…
Sep 16, 2026
e074dd0
module_charge: register charge_math.o in the hand-written Makefile build
Sep 16, 2026
aab8b0e
Merge branch 'develop' into 20260916
mohanchen Sep 16, 2026
7b346dc
module_charge: extract Charge::atomic_rho into charge_atomic free fun…
Sep 16, 2026
0c7109d
module_charge: forbid Charge copies and guard tau.cube write
Sep 16, 2026
871f8f2
module_base: tolerate null grid buffer when a rank owns no grid points
Sep 16, 2026
1d3beac
module_charge: extract Charge::set_rho_core into charge_math free fun…
Sep 16, 2026
49b0a65
module_charge: vectorize Charge_Extra history arrays and forbid copies
Sep 16, 2026
e0480f3
Rename charge_math to chg_tools and unify namespace module_charge
Sep 17, 2026
5154f98
module_charge: refactor Symmetry_rho class to free functions
Sep 17, 2026
dfbf99d
module_charge: extract MixingConfig header and drop unused inner_prod…
Sep 17, 2026
619029d
module_gint: move gint_prec_ctrl from module_charge
Sep 17, 2026
2ac0017
module_charge: extract mixing inner products into chg_drho free funct…
Sep 17, 2026
61c2529
module_charge: hide cal_drho/cal_dkin in an anonymous namespace
Sep 17, 2026
dfe1dac
module_gint: fix include path in test_gint_prec_ctrl after relocation
Sep 17, 2026
6d127d5
module_charge: extract Kerker screen kernels into chg_precond free fu…
Sep 17, 2026
e4e6fc9
module_charge: fix Makefile.Objects after mix_precond -> chg_precond …
Sep 17, 2026
9a96847
module_charge: drop Charge_Mixing::get_drho/get_dkin wrappers
Sep 17, 2026
c89aba3
module_charge: rename chgmixing.h/cpp to chg_routine.h/cpp
Sep 17, 2026
ae65748
module_charge: rename mixing_config.h to chg_mix_cfg.h
Sep 17, 2026
c531ea4
module_charge: convert Charge MPI helpers into chg_parallel free func…
Sep 17, 2026
b976259
Rename charge_atomic files to chg_atomic
Sep 17, 2026
2f49955
module_charge: extract USPP double-grid split/merge into chg_uspp fre…
Sep 17, 2026
4650306
module_charge: rewrite MixDivCombTest for the new split_dgrid/merge_d…
Sep 17, 2026
2670f86
module_charge: drop legacy divide_data/combine_data/clean_data members
Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,6 @@ ${OBJ_DIR}/parse_args.o: $(ABACUS_ROOT)source_io/parse_args.cpp $(BUILD_INFO_DIR
@mkdir -p $(dir $@)
${CXX} ${OPTS} ${OPTS_MPI} -c ${HONG} $< -o $@

# Explicit rule: source_cell/module_symmetry and source_estate/module_charge
# both contain a symm_rho.cpp. VPATH resolves symm_rho.o to the source_cell
# one (listed first), so the Symmetry_rho implementation needs an explicit
# object name to be compiled from the correct source.
${OBJ_DIR}/symm_rho_charge.o: $(ABACUS_ROOT)source_estate/module_charge/symm_rho.cpp
@mkdir -p $(dir $@)
${CXX} ${OPTS} ${OPTS_MPI} -c ${HONG} $< -o $@

###### END of ABACUS INFO PART ######

#==========================
Expand Down
18 changes: 10 additions & 8 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ OBJS_GINT=batch_biggrid.o\
gint_fvl.o\
gint_info.o\
gint_interface.o\
gint_prec_ctrl.o\
gint_rho.o\
gint_drho.o\
gint_tau.o\
Expand Down Expand Up @@ -823,18 +824,21 @@ OBJS_SRCPW=h_ewald_pw.o\
vnl_pw_grad.o\
vnl_pw_init_vnl.o\
vnl_pw_qrad.o\
chgmixing.o\
gint_prec_ctrl.o\
chg_routine.o\
charge.o\
chg_atomic.o\
charge_init.o\
charge_mpi.o\
chg_tools.o\
chg_parallel.o\
charge_extra.o\
charge_mixing.o\
charge_mixing_dmr.o\
mix_resid.o\
mix_precond.o\
chg_drho.o\
chg_precond.o\
charge_mixing_rho.o\
charge_mixing_uspp.o\
chg_symm.o\
chg_symm_detail.o\
chg_uspp.o\
rhog_io.o\
write_elecstat_pot.o\
write_init.o\
Expand Down Expand Up @@ -892,8 +896,6 @@ OBJS_SRCPW=h_ewald_pw.o\
stress_pw.o\
of_stress_pw.o\
of_print_info.o\
symm_rho_charge.o\
symm_rhog.o\
setup_psi_pw.o\
setup_psi.o\
psi_prepare.o\
Expand Down
7 changes: 6 additions & 1 deletion source/source_base/parallel_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ void Parallel_Grid::reduce(double* rhotot, const double* const rhoin, const bool
return;
}

assert(rhoin != nullptr);
// A rank may own zero real-space grid points (nrxx == 0) when the grid is
// decomposed across more processes than it has slabs. In that case the
// source buffer is legitimately null: MPI_Gatherv is called with
// sendcount 0 below and ignores the send buffer. Only a null buffer with a
// non-zero nrxx is a genuine bug.
assert(rhoin != nullptr || this->nrxx == 0);
assert(this->nrxx == this->ncxy * this->nczp);

int pool_size = 0;
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_fp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "source_base/tool_quit.h"
#include "source_cell/cal_ux.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_cell/read_pp_ucell.h"
#include "source_estate/param_update.h"
#include "source_hamilt/module_ewald/h_ewald_pw.h"
Expand Down
33 changes: 26 additions & 7 deletions source/source_esolver/esolver_ks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#include "source_io/module_json/output_info.h"

#include "source_estate/update_pot.h" // mohan add 20251016
#include "source_estate/module_charge/chgmixing.h" // mohan add 20251018
#include "source_estate/module_charge/chg_routine.h" // mohan add 20251018
#include "source_estate/module_charge/chg_drho.h" // module_charge::cal_drho/cal_dkin
#include "source_pw/module_pwdft/setup_pwwfc.h" // mohan add 20251018
#include "source_hsolver/hsolver.h"
#include "source_io/module_energy/write_eig_occ.h"
Expand Down Expand Up @@ -65,9 +66,24 @@ void ESolver_KS::before_all_runners(BaseCell& basecell, const Input_para& inp)
//! 3) setup charge mixing
p_chgmix = new Charge_Mixing();
p_chgmix->set_rhopw(this->pw_rho, this->pw_rhod);
p_chgmix->set_mixing(inp.mixing_mode, inp.mixing_beta, inp.mixing_ndim,
inp.mixing_gg0, inp.mixing_tau, inp.mixing_beta_mag, inp.mixing_gg0_mag,
inp.mixing_gg0_min, inp.mixing_angle, inp.mixing_dmr, ucell.omega, ucell.tpiba);
MixingConfig mix_cfg;
mix_cfg.mixing_mode = inp.mixing_mode;
mix_cfg.mixing_beta = inp.mixing_beta;
mix_cfg.mixing_ndim = inp.mixing_ndim;
mix_cfg.mixing_gg0 = inp.mixing_gg0;
mix_cfg.mixing_tau = inp.mixing_tau;
mix_cfg.mixing_beta_mag = inp.mixing_beta_mag;
mix_cfg.mixing_gg0_mag = inp.mixing_gg0_mag;
mix_cfg.mixing_gg0_min = inp.mixing_gg0_min;
mix_cfg.mixing_angle = inp.mixing_angle;
mix_cfg.mixing_dmr = inp.mixing_dmr;
mix_cfg.nspin = inp.nspin;
mix_cfg.scf_thr_type = inp.scf_thr_type;
mix_cfg.double_grid = PARAM.globalv.double_grid;
mix_cfg.gamma_only_pw = PARAM.globalv.gamma_only_pw;
mix_cfg.domag = PARAM.globalv.domag;
mix_cfg.domag_z = PARAM.globalv.domag_z;
p_chgmix->set_mixing(mix_cfg, ucell.omega, ucell.tpiba);
p_chgmix->init_mixing();

//! 4) setup plane wave for electronic wave functions
Expand Down Expand Up @@ -97,7 +113,8 @@ void ESolver_KS::hamilt2rho(UnitCell& ucell, const int istep, const int iter, co
// example wavefunctions uses 20 processors while density uses 10.
if (PARAM.globalv.ks_run)
{
drho = p_chgmix->get_drho(&this->chr, this->inp_->nelec);
drho = module_charge::cal_drho(&this->chr, this->inp_->nelec, *this->pw_rho,
p_chgmix->get_mixing_config(), ucell.omega, ucell.tpiba);
hsolver_error = 0.0;
if (iter == 1 && this->inp_->calculation != "nscf")
{
Expand All @@ -114,7 +131,8 @@ void ESolver_KS::hamilt2rho(UnitCell& ucell, const int istep, const int iter, co

this->hamilt2rho_single(ucell, istep, iter, diag_ethr);

drho = p_chgmix->get_drho(&this->chr, this->inp_->nelec);
drho = module_charge::cal_drho(&this->chr, this->inp_->nelec, *this->pw_rho,
p_chgmix->get_mixing_config(), ucell.omega, ucell.tpiba);

hsolver_error = hsolver::cal_hsolve_error(this->inp_->basis_type,
this->inp_->esolver_type, diag_ethr, this->inp_->nelec);
Expand Down Expand Up @@ -273,7 +291,8 @@ void ESolver_KS::iter_finish(UnitCell& ucell, const int istep, int& iter, bool &
double dkin = 0.0; // for meta-GGA
if (XC_Functional::get_ked_flag())
{
dkin = p_chgmix->get_dkin(&this->chr, this->inp_->nelec);
dkin = module_charge::cal_dkin(&this->chr, this->inp_->nelec, *this->pw_rho,
p_chgmix->get_mixing_config(), ucell.omega);
}

// Iter finish
Expand Down
8 changes: 4 additions & 4 deletions source/source_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "source_lcao/setup_dftu_lcao.h"
#include "source_pw/module_pwdft/dftu_base.h" // Plus_U_Base (PW and LCAO share it)
#include "source_hamilt/hs_matrix_k.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_lcao/lcao_domain.h" // need DeePKS_init
#include "source_lcao/force_stress_lcao.h"
#include "source_hamilt/module_gint/gint.h"
Expand All @@ -18,7 +18,7 @@
#include "../source_lcao/module_ri/exx_opt_orb.h"
#endif
#include "source_lcao/module_rdmft/rdmft.h"
#include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006
#include "source_estate/module_charge/chg_routine.h" // use charge mixing, mohan add 20251006
#include "source_estate/module_dm/init_dm.h" // init dm from electronic wave functions
#include "source_io/module_restart/restart.h" // GlobalC::restart for load_exx_flag
#include "source_io/module_ctrl/ctrl_runner_lcao.h" // use ctrl_runner_lcao()
Expand Down Expand Up @@ -234,7 +234,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
#endif

// 16) the electron charge density should be symmetrized,
Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);

// 17) update of RDMFT, added by jghan
if (this->inp_->rdmft == true)
Expand Down Expand Up @@ -506,7 +506,7 @@ void ESolver_KS_LCAO<TK, TR>::hamilt2rho_single(UnitCell& ucell, int istep, int
#endif

// 5) symmetrize the charge density
Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);

// 6) calculate delta energy
this->pelec->f_en.deband = this->pelec->cal_delta_eband(ucell);
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_ks_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "source_lcao/record_adj.h" // adjacent atoms
#include "source_basis/module_nao/two_center_bundle.h" // nao basis
#include "source_hamilt/module_gint/gint_info.h"
#include "source_estate/module_charge/gint_prec_ctrl.h"
#include "source_hamilt/module_gint/gint_prec_ctrl.h"
#include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251008
#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008
#include "source_lcao/module_rdmft/rdmft.h" // rdmft
Expand Down
4 changes: 2 additions & 2 deletions source/source_esolver/esolver_ks_lcao_tddft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "source_io/module_wf/read_wfc_nao.h"
//------LCAO HSolver ElecState-------
#include "source_estate/elecstate_tools.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_estate/module_dm/cal_edm_tddft.h"
#include "source_estate/module_pot/h_tddft_pw.h"
Expand Down Expand Up @@ -378,7 +378,7 @@ void ESolver_KS_LCAO_TDDFT<TR, Device>::hamilt2rho_single(UnitCell& ucell, const
// Symmetrize the charge density only for ground state
if (istep <= 1)
{
Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
}
#ifdef __EXX
if (this->exx_info_.info_ri.real_number)
Expand Down
4 changes: 2 additions & 2 deletions source/source_esolver/esolver_ks_lcaopw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <iostream>

//--------------temporary----------------------------
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_estate/occupy.h"
#include "source_hamilt/module_ewald/h_ewald_pw.h"
//-----force-------------------
Expand Down Expand Up @@ -176,7 +176,7 @@ namespace ModuleESolver
}
#endif

Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rhod, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rhod, ucell.symm);

// deband is calculated from "output" charge density calculated
// in sum_band
Expand Down
6 changes: 3 additions & 3 deletions source/source_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "esolver_ks_pw.h"

#include "source_estate/elecstate_pw.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_hsolver/diago_iter_assist.h"
#include "source_hsolver/diago_params.h"
#include "source_hsolver/hsolver_pw.h"
Expand All @@ -14,7 +14,7 @@
#include "source_base/kernels/dsp/dsp_connector.h"
#endif

#include "source_estate/module_charge/chgmixing.h" // use charge mixing, mohan add 20251006
#include "source_estate/module_charge/chg_routine.h" // use charge mixing, mohan add 20251006
#include "source_estate/setup_estate_pw.h" // mohan add 20251005
#include "source_hamilt/module_xc/general_exx_info.h" // for General_Exx_Info type used via general_exx_info_
#include "source_io/module_ctrl/ctrl_output_pw.h" // mohan add 20250927
Expand Down Expand Up @@ -277,7 +277,7 @@ void ESolver_KS_PW<T, Device>::hamilt2rho_single(UnitCell& ucell, const int iste
}

// symmetrize the charge density
Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rhod, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rhod, ucell.symm);

ModuleBase::timer::end("ESolver_KS_PW", "hamilt2rho_single");
}
Expand Down
17 changes: 2 additions & 15 deletions source/source_esolver/esolver_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "source_io/module_parameter/parameter.h"
//-----------temporary-------------------------
#include "source_base/global_function.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_hamilt/module_ewald/h_ewald_pw.h"
#include "source_cell/cal_ux.h"
#include "source_pw/module_pwdft/force_pw.h"
Expand Down Expand Up @@ -240,7 +240,7 @@ void ESolver_OF::before_opt(const int istep, UnitCell& ucell)
const int nspin = this->inp_->nspin;
if (this->inp_->init_chg == "file")
{
Symmetry_rho::symmetrize_rho(nspin, this->chr, this->pw_rho, ucell.symm);
module_charge::symmetrize_rho(nspin, this->chr, this->pw_rho, ucell.symm);
for (int is = 0; is < nspin; ++is)
{
for (int ibs = 0; ibs < this->pw_rho->nrxx; ++ibs)
Expand Down Expand Up @@ -385,19 +385,6 @@ void ESolver_OF::update_rho()
}
}
// // ------------ turn on symmetry may cause instability in optimization ------------
// if (ModuleSymmetry::Symmetry::symm_flag == 1)
// {
// Symmetry_rho srho;
// for (int is = 0; is < this->inp_->nspin; is++)
// {
// srho.begin(is, *(this->chr), this->pw_rho, Pgrid, ucell.symm);
// for (int ibs = 0; ibs < this->pw_rho->nrxx; ++ibs)
// {
// this->pphi_[is][ibs] = sqrt(this->chr.rho[is][ibs]);
// }
// }
// }
// // --------------------------------------------------------------------------------
}

/**
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_of_tddft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "source_io/module_parameter/parameter.h"
//-----------temporary-------------------------
#include "source_base/global_function.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_hamilt/module_ewald/h_ewald_pw.h"
#include "source_cell/cal_ux.h"
//-----force-------------------
Expand Down
4 changes: 2 additions & 2 deletions source/source_esolver/esolver_sdft_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "source_base/global_variable.h"
#include "source_base/memory_recorder.h"
#include "source_base/parallel_comm.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_hsolver/diago_iter_assist.h"
#include "source_hsolver/diago_params.h"
#include "source_io/module_parameter/parameter.h"
Expand Down Expand Up @@ -193,7 +193,7 @@ void ESolver_SDFT_PW<T, Device>::hamilt2rho_single(UnitCell& ucell, int istep, i

if (PARAM.globalv.ks_run)
{
Symmetry_rho::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
module_charge::symmetrize_rho(this->inp_->nspin, this->chr, this->pw_rho, ucell.symm);
this->pelec->f_en.deband = this->pelec->cal_delta_eband(ucell);
}
else
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "source_cell/module_neighbor/sltk_grid_driver.h"
#include "source_esolver/esolver_ks_lcao.h"
#include "source_estate/elecstate_lcao.h"
#include "source_estate/module_charge/symm_rho.h"
#include "source_estate/module_charge/chg_symm.h"
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_hamilt/module_gint/gint.h"
#include "source_io/module_chgpot/get_pchg_lcao.h"
Expand Down
17 changes: 9 additions & 8 deletions source/source_estate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ list(APPEND objects
module_pot/td_field.cpp
module_pot/td_field_profiles.cpp
module_pot/td_field_manager.cpp
module_charge/chgmixing.cpp
module_charge/gint_prec_ctrl.cpp
module_charge/chg_routine.cpp
module_charge/charge.cpp
module_charge/chg_atomic.cpp
module_charge/charge_init.cpp
module_charge/charge_mpi.cpp
module_charge/chg_tools.cpp
module_charge/chg_parallel.cpp
module_charge/charge_extra.cpp
module_charge/charge_mixing.cpp
module_charge/charge_mixing_dmr.cpp
module_charge/mix_resid.cpp
module_charge/mix_precond.cpp
module_charge/chg_drho.cpp
module_charge/chg_precond.cpp
module_charge/charge_mixing_rho.cpp
module_charge/charge_mixing_uspp.cpp
module_charge/symm_rho.cpp
module_charge/symm_rhog.cpp
module_charge/chg_symm.cpp
module_charge/chg_uspp.cpp
module_charge/chg_symm_detail.cpp
rhog_io.cpp
write_elecstat_pot.cpp
write_init.cpp
Expand Down
3 changes: 2 additions & 1 deletion source/source_estate/elecstate_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "source_base/module_device/device.h"
#include "source_base/parallel_reduce.h"
#include "source_base/timer.h"
#include "source_estate/module_charge/chg_parallel.h"
#include "source_estate/uspp_density.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/module_parameter/parameter.h"
Expand Down Expand Up @@ -171,7 +172,7 @@ template <typename T, typename Device>
void ElecStatePW<T, Device>::parallelK()
{
#ifdef __MPI
this->charge->rho_mpi();
module_charge::rho_mpi(*this->charge);
#endif
}

Expand Down
4 changes: 3 additions & 1 deletion source/source_estate/elecstate_pw_cal_tau.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "elecstate_pw.h"

#include "source_estate/module_charge/chg_parallel.h"

namespace elecstate {

template<typename T, typename Device>
Expand Down Expand Up @@ -55,7 +57,7 @@ void ElecStatePW<T, Device>::cal_tau(const psi::Psi<T, Device>& psi)
}
}
#ifdef __MPI
this->charge->kin_r_mpi();
module_charge::kin_r_mpi(*this->charge);
#endif
ModuleBase::TITLE("ElecStatePW", "cal_tau");
}
Expand Down
Loading
Loading