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:
@ -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);
|
||||
|
||||
|
@ -15,7 +15,7 @@ public:
|
||||
Integer MaxIterations;
|
||||
int verbose;
|
||||
ConjugateGradient(RealD tol,Integer maxit) : Tolerance(tol), MaxIterations(maxit) {
|
||||
verbose=0;
|
||||
verbose=1;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user