1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-10 03:17:07 +01:00

Some small steps towards a multigrid

This commit is contained in:
Peter Boyle
2015-06-22 12:49:44 +01:00
parent fd1a8abcd1
commit a17684ebe2
12 changed files with 243 additions and 278 deletions

View File

@ -85,10 +85,6 @@ namespace Grid {
void Orthogonalise(void){
CoarseScalar InnerProd(CoarseGrid);
blockOrthogonalise(InnerProd,subspace);
#if 1
// CheckOrthogonal();
#endif
}
void CheckOrthogonal(void){
CoarseVector iProj(CoarseGrid);
@ -125,7 +121,7 @@ namespace Grid {
RealD scale;
ConjugateGradient<FineField> CG(1.0e-4,10000);
ConjugateGradient<FineField> CG(1.0e-3,10000);
FineField noise(FineGrid);
FineField Mn(FineGrid);

View File

@ -15,7 +15,7 @@ public:
Integer MaxIterations;
int verbose;
ConjugateGradient(RealD tol,Integer maxit) : Tolerance(tol), MaxIterations(maxit) {
verbose=0;
verbose=1;
};

View File

@ -48,11 +48,11 @@ namespace Grid {
if(cp<rsq) {
Linop.HermOp(psi,r);
axpy(r,-1.0,src,r);
RealD true_resid = norm2(r);
RealD tr = norm2(r);
std::cout<<"PrecGeneralisedConjugateResidual: Converged on iteration " <<steps
<< " computed residual "<<sqrt(cp/ssq)
<< " true residual "<<true_resid
<< " target " <<Tolerance <<std::endl;
<< " true residual " <<sqrt(tr/ssq)
<< " target " <<Tolerance <<std::endl;
return;
}