*** empty log message ***

This commit is contained in:
jiri 2008-12-18 15:48:25 +00:00
parent e49f2a9d6c
commit f73b10534f
3 changed files with 14 additions and 4 deletions

View File

@ -61,9 +61,13 @@ p=rr;
for(int iter=0; iter<= itmax; iter++) for(int iter=0; iter<= itmax; iter++)
{ {
double err=p.norm(); double err=p.norm();
if(verbose) cout << "conjgrad: iter= "<<iter<<" err= "<< if(verbose)
{
cout << "conjgrad: iter= "<<iter<<" err= "<<
setiosflags(ios::scientific)<<setprecision(8) <<err<< setiosflags(ios::scientific)<<setprecision(8) <<err<<
resetiosflags(ios::scientific)<<setprecision(12)<<"\n"; resetiosflags(ios::scientific)<<setprecision(12)<<"\n";
cout.flush();
}
if(err <= tol) if(err <= tol)
{ {
if(!issquare) delete r; if(!issquare) delete r;

View File

@ -156,10 +156,11 @@ for(int iroot=0; iroot<=min(krylovsize,nroots-1); ++iroot)
if(verbose && iroot<=max(oldnroot,nroot)) if(verbose && iroot<=max(oldnroot,nroot))
{ {
cout <<"Davidson: iter="<<it <<" dim="<<krylovsize<<" root="<<iroot<<" energy="<<r[iroot]<<"\n"; cout <<"Davidson: iter="<<it <<" dim="<<krylovsize<<" root="<<iroot<<" energy="<<r[iroot]<<"\n";
cout.flush();
} }
} }
if(verbose && oldnroot!=nroot) cout <<"root no. "<<oldnroot<<" converged\n"; if(verbose && oldnroot!=nroot) {cout <<"root no. "<<oldnroot<<" converged\n"; cout.flush();}
if (nroot>=nroots) goto converged; if (nroot>=nroots) goto converged;
if (it==maxit-1) break; //not converged if (it==maxit-1) break; //not converged
@ -223,7 +224,7 @@ goto finished;
converged: converged:
AuxStorage<typename LA_traits<T>::elementtype> *ev; AuxStorage<typename LA_traits<T>::elementtype> *ev;
if(eivecsfile) ev = new AuxStorage<typename LA_traits<T>::elementtype>(eivecsfile); if(eivecsfile) ev = new AuxStorage<typename LA_traits<T>::elementtype>(eivecsfile);
if(verbose) cout << "Davidson converged in "<<it<<" iterations.\n"; if(verbose) {cout << "Davidson converged in "<<it<<" iterations.\n"; cout.flush();}
for(nroot=0; nroot<nroots; ++nroot) for(nroot=0; nroot<nroots; ++nroot)
{ {
eivals[nroot]=r[nroot]; eivals[nroot]=r[nroot];

View File

@ -188,11 +188,16 @@ for (int l=0;l<neustart;l++) // main loop for restarts
} }
//Schritt 6: Konvergenz? //Schritt 6: Konvergenz?
if(verbose) cout << "gmres iter "<<l<<" "<<k<<" resid " if(verbose)
{
cout << "gmres iter "<<l<<" "<<k<<" resid "
<<setw(0)<<setiosflags(ios::scientific)<<setprecision(8) <<setw(0)<<setiosflags(ios::scientific)<<setprecision(8)
<<abs(d[k+1])<< " thr "<<eps*beta_0<< " reduction " <<abs(d[k+1])<< " thr "<<eps*beta_0<< " reduction "
<<setw(5)<<setprecision(2)<<resetiosflags(ios::scientific) <<setw(5)<<setprecision(2)<<resetiosflags(ios::scientific)
<<(d_alt - abs(d[k+1]))/d_alt*100<< "\n" <<setprecision(12); <<(d_alt - abs(d[k+1]))/d_alt*100<< "\n" <<setprecision(12);
cout.flush();
}
d_alt = abs(d[k+1]); d_alt = abs(d[k+1]);
//*err= d_alt; //*err= d_alt;
if (d_alt < eps*beta_0) if (d_alt < eps*beta_0)