1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Tweaks to subspace set up to put in g5 r5 hermiticity

This commit is contained in:
Peter Boyle 2015-07-21 12:13:03 +09:00
parent 8a7b7f1e2b
commit c515d069cd

View File

@ -117,15 +117,15 @@ namespace Grid {
}
Orthogonalise();
}
virtual void CreateSubspace(GridParallelRNG &RNG,LinearOperatorBase<FineField> &hermop) {
virtual void CreateSubspace(GridParallelRNG &RNG,LinearOperatorBase<FineField> &hermop,int nn=nbasis) {
RealD scale;
ConjugateGradient<FineField> CG(1.0e-4,10000);
ConjugateGradient<FineField> CG(2.0e-3,10000);
FineField noise(FineGrid);
FineField Mn(FineGrid);
for(int b=0;b<nbasis;b++){
for(int b=0;b<nn;b++){
gaussian(RNG,noise);
scale = std::pow(norm2(noise),-0.5);
@ -133,7 +133,7 @@ namespace Grid {
hermop.Op(noise,Mn); std::cout << "noise ["<<b<<"] <n|MdagM|n> "<<norm2(Mn)<<std::endl;
for(int i=0;i<2;i++){
for(int i=0;i<1;i++){
CG(hermop,noise,subspace[b]);
@ -144,7 +144,8 @@ namespace Grid {
}
hermop.Op(noise,Mn); std::cout << "filtered["<<b<<"] <f|MdagM|f> "<<norm2(Mn)<<std::endl;
subspace[b] = noise;
subspace[b] = noise;
}
Orthogonalise();