Details
When calculating with esolver ofdft, a large part of total time is consumed by Symmetry::rhog_symmetry (up to 90%+ for large systems).
Symmetry::rhog_symmetry is called exactly once in ESolver_OF::before_opt:
Symmetry_rho::symmetrize_rho(PARAM.inp.nspin, this->chr, this->pw_rho, ucell.symm);
for (int is = 0; is < PARAM.inp.nspin; ++is)
{
if (PARAM.inp.init_chg != "file")
{
for (int ibs = 0; ibs < this->pw_rho->nrxx; ++ibs)
{
// Here we initialize rho to be uniform,
// because the rho got by pot.init_pot -> Charge::atomic_rho may contain minus elements.
this->chr.rho[is][ibs] = this->nelec_[is] / ucell.omega;
this->pphi_[is][ibs] = sqrt(this->chr.rho[is][ibs]);
}
}
else
{
for (int ibs = 0; ibs < this->pw_rho->nrxx; ++ibs)
{
this->pphi_[is][ibs] = sqrt(this->chr.rho[is][ibs]);
}
}
}
When init_chg is set by default, i.e. the first if-branch, symmetrize_rho will be called anyway and the chr.rho is overwritten immediately.
Task list for Issue attackers (only for developers)
Details
When calculating with
esolver ofdft, a large part of total time is consumed bySymmetry::rhog_symmetry(up to 90%+ for large systems).Symmetry::rhog_symmetryis called exactly once inESolver_OF::before_opt:When
init_chgis set by default, i.e. the firstif-branch,symmetrize_rhowill be called anyway and thechr.rhois overwritten immediately.Task list for Issue attackers (only for developers)