@@ -28,7 +28,7 @@ Stochastic_Iter::~Stochastic_Iter()
2828void Stochastic_Iter::init (const int dim, int * nchip_in)
2929{
3030 nchip = nchip_in;
31- targetne = GlobalC::ucell .nelec ;
31+ targetne = GlobalC::CHR .nelec ;
3232 stoche.init ( dim, INPUT.nche_sto );
3333 stohchi.init ();
3434 delete [] spolyv;
@@ -145,13 +145,13 @@ void Stochastic_Iter::itermu(int &iter)
145145 if (iter == 1 )
146146 {
147147 dmu = 2 ;
148- th_ne = 0.1 * GlobalV::SCF_THR * GlobalC::ucell .nelec ;
149- std::cout<<" th_ne " <<th_ne<<std::endl;
148+ th_ne = 0.1 * GlobalV::SCF_THR * GlobalC::CHR .nelec ;
149+ // std::cout<<"th_ne "<<th_ne<<std::endl;
150150 }
151151 else
152152 {
153153 dmu = 0.1 ;
154- th_ne = GlobalV::SCF_THR * 1e-2 * GlobalC::ucell .nelec ;
154+ th_ne = GlobalV::SCF_THR * 1e-2 * GlobalC::CHR .nelec ;
155155 }
156156 mu = mu0 - dmu;
157157 double ne1 = calne ();
@@ -188,7 +188,7 @@ void Stochastic_Iter::itermu(int &iter)
188188 mu2 += dmu;
189189 mu = mu2;
190190 ne2 = calne ();
191- cout<<" Reset mu2 form " <<mu2-dmu<<" to " <<mu2<<endl;
191+ // cout<<"Reset mu2 from "<<mu2-dmu<<" to "<<mu2<<endl;
192192 dmu *= 2 ;
193193 }
194194 int count = 0 ;
@@ -219,12 +219,12 @@ void Stochastic_Iter::itermu(int &iter)
219219 " Cannot converge feimi energy. Please retry with different random number" );
220220 }
221221 }
222- std::cout <<" Converge fermi energy = " <<mu<<" Ry in " <<count<<" steps." <<std::endl;
222+ GlobalV::ofs_running <<" Converge fermi energy = " <<mu<<" Ry in " <<count<<" steps." <<std::endl;
223223 // precision check
224224 double tmpre;
225225 tmpre = stoche.coef [stoche.norder -1 ] * spolyv[stoche.norder -1 ];
226226 MPI_Allreduce (MPI_IN_PLACE, &tmpre, 1 , MPI_DOUBLE, MPI_SUM , MPI_COMM_WORLD);
227- std::cout <<" Chebyshev Precision: " <<abs (tmpre/targetne)<<std::endl;
227+ GlobalV::ofs_running <<" Chebyshev Precision: " <<abs (tmpre/targetne)<<std::endl;
228228 if (tmpre/targetne > GlobalV::SCF_THR )
229229 {
230230 stringstream ss;
@@ -458,7 +458,7 @@ void Stochastic_Iter::sum_stoband(Stochastic_WF& stowf)
458458 GlobalC::en.demet *= Occupy::gaussian_parameter;
459459
460460 cout.precision (12 );
461- cout <<" Renormalize rho from ne = " <<sto_ne+KS_ne<<" to targetne = " <<targetne<<endl;
461+ GlobalV::ofs_running <<" Renormalize rho from ne = " <<sto_ne+KS_ne<<" to targetne = " <<targetne<<endl;
462462
463463 double factor;
464464 if (abs (sto_ne) > 1e-20 )
0 commit comments