*** empty log message ***
This commit is contained in:
parent
e49f2a9d6c
commit
f73b10534f
@ -61,9 +61,13 @@ p=rr;
|
||||
for(int iter=0; iter<= itmax; iter++)
|
||||
{
|
||||
double err=p.norm();
|
||||
if(verbose) cout << "conjgrad: iter= "<<iter<<" err= "<<
|
||||
if(verbose)
|
||||
{
|
||||
cout << "conjgrad: iter= "<<iter<<" err= "<<
|
||||
setiosflags(ios::scientific)<<setprecision(8) <<err<<
|
||||
resetiosflags(ios::scientific)<<setprecision(12)<<"\n";
|
||||
cout.flush();
|
||||
}
|
||||
if(err <= tol)
|
||||
{
|
||||
if(!issquare) delete r;
|
||||
|
@ -156,10 +156,11 @@ for(int iroot=0; iroot<=min(krylovsize,nroots-1); ++iroot)
|
||||
if(verbose && iroot<=max(oldnroot,nroot))
|
||||
{
|
||||
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 (it==maxit-1) break; //not converged
|
||||
|
||||
@ -223,7 +224,7 @@ goto finished;
|
||||
converged:
|
||||
AuxStorage<typename LA_traits<T>::elementtype> *ev;
|
||||
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)
|
||||
{
|
||||
eivals[nroot]=r[nroot];
|
||||
|
7
gmres.h
7
gmres.h
@ -188,11 +188,16 @@ for (int l=0;l<neustart;l++) // main loop for restarts
|
||||
}
|
||||
|
||||
//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)
|
||||
<<abs(d[k+1])<< " thr "<<eps*beta_0<< " reduction "
|
||||
<<setw(5)<<setprecision(2)<<resetiosflags(ios::scientific)
|
||||
<<(d_alt - abs(d[k+1]))/d_alt*100<< "\n" <<setprecision(12);
|
||||
cout.flush();
|
||||
}
|
||||
|
||||
d_alt = abs(d[k+1]);
|
||||
//*err= d_alt;
|
||||
if (d_alt < eps*beta_0)
|
||||
|
Loading…
Reference in New Issue
Block a user