Skip to content

Commit 8516477

Browse files
committed
update esolver_fp, move teardown to desconstructor
1 parent 16ba5d2 commit 8516477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/source_esolver/esolver_fp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ ESolver_FP::~ESolver_FP()
3030
//****************************************************
3131
// do not add any codes in this deconstructor funcion
3232
//****************************************************
33+
// mohan add 20251005, delete pw_rho and pw_rhod, ensure following functions will not use these
34+
pw::teardown_pwrho(this->pw_rho_flag, PARAM.globalv.double_grid, this->pw_rho, this->pw_rhod);
3335

3436
delete this->pelec;
3537
}
@@ -262,8 +264,6 @@ void ESolver_FP::after_all_runners(UnitCell& ucell)
262264
GlobalV::ofs_running << " !FINAL_ETOT_IS " << this->pelec->f_en.etot * ModuleBase::Ry_to_eV << " eV" << std::endl;
263265
GlobalV::ofs_running << " --------------------------------------------\n\n" << std::endl;
264266

265-
// mohan add 20251005, delete pw_rho and pw_rhod, ensure following functions will not use these
266-
pw::teardown_pwrho(this->pw_rho_flag, PARAM.globalv.double_grid, this->pw_rho, this->pw_rhod);
267267
}
268268

269269
} // namespace ModuleESolver

0 commit comments

Comments
 (0)