Skip to content

Commit 39d1383

Browse files
authored
Fix: reorder after_scf() call in after_opt() (#6570)
1 parent 79b2508 commit 39d1383

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/source_esolver/esolver_of.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,18 +495,17 @@ void ESolver_OF::after_opt(const int istep, UnitCell& ucell, const bool conv_eso
495495
this->kedf_manager_->get_energy_density(this->chr.rho, this->pphi_, this->pw_rho, this->chr.kin_r);
496496
}
497497

498-
//------------------------------------------------------------------
499-
// 2) call after_scf() of ESolver_FP
500-
//------------------------------------------------------------------
501-
ESolver_FP::after_scf(ucell, istep, conv_esolver);
502-
503-
504498
// should not be here? mohan note 2025-03-03
505499
for (int ir = 0; ir < this->pw_rho->nrxx; ++ir)
506500
{
507501
this->chr.rho_save[0][ir] = this->chr.rho[0][ir];
508502
}
509503

504+
//------------------------------------------------------------------
505+
// 2) call after_scf() of ESolver_FP
506+
//------------------------------------------------------------------
507+
ESolver_FP::after_scf(ucell, istep, conv_esolver);
508+
510509
#ifdef __MLALGO
511510
//------------------------------------------------------------------
512511
// Generate data if needed

0 commit comments

Comments
 (0)