Skip to content

Commit 266555c

Browse files
committed
move teardown to deconstructor of ESolver
1 parent 29776a6 commit 266555c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/source_esolver/esolver_ks_pw.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ ESolver_KS_PW<T, Device>::~ESolver_KS_PW()
5353
// delete Hamilt
5454
this->deallocate_hamilt();
5555

56+
elecstate::teardown_estate_pw<T, Device>(this->pelec, this->vsep_cell);
57+
5658
if (PARAM.inp.device == "gpu" || PARAM.inp.precision == "single")
5759
{
5860
delete this->kspw_psi;
@@ -542,7 +544,6 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
542544
this->kspw_psi, this->__kspw_psi, this->sf,
543545
this->ppcell, this->solvent, this->ctx, this->Pgrid, PARAM.inp);
544546

545-
elecstate::teardown_estate_pw<T, Device>(this->pelec, this->vsep_cell);
546547
}
547548

548549
template class ESolver_KS_PW<std::complex<float>, base_device::DEVICE_CPU>;

0 commit comments

Comments
 (0)