Skip to content

Commit 9c44600

Browse files
committed
fix bug
1 parent 1a154f6 commit 9c44600

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

source/module_hamilt_lcao/module_gint/gint.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ void Gint::transfer_DM2DtoGrid(std::vector<hamilt::HContainer<double>*> DM2D) {
265265
}
266266
Parallel_Orbitals *pv = new Parallel_Orbitals();
267267
pv->set(mg, ng, nb, blacs_ctxt);
268-
pv->set_atomic_trace(iat2iwt, ucell->nat, mg);
268+
pv->set_atomic_trace(iat2iwt.data(), ucell->nat, mg);
269269
auto ijr_info = DM2D[0]->get_ijr_info();
270270
this-> DM2D_tmp = new hamilt::HContainer<double>(pv, nullptr, &ijr_info);
271271
this-> DM2D_tmp->set_zero();
@@ -290,8 +290,6 @@ void Gint::transfer_DM2DtoGrid(std::vector<hamilt::HContainer<double>*> DM2D) {
290290
}
291291
hamilt::transferParallels2Serials( *(this->DM2D_tmp), this->DMRGint[is]);
292292
}
293-
delete pv;
294-
delete this-> DM2D_tmp;
295293
#else
296294
//this->DMRGint_full = DM2D[0];
297295
#endif

source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ void Gint_k::transfer_pvpR(hamilt::HContainer<std::complex<double>>* hR,
182182
}
183183
delete hRGint_tmpCd;
184184
}
185-
delete pv;
186-
delete this->hR_tmp;
187185
#else
188186

189187
#endif

0 commit comments

Comments
 (0)