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

Debug code

This commit is contained in:
Peter Boyle 2023-04-20 14:54:36 -04:00
parent 3aa43e6065
commit bbec7f9fa9
3 changed files with 11 additions and 2 deletions

View File

@ -196,7 +196,6 @@ void WilsonFermion5D<Impl>::DhopDir(const FermionField &in, FermionField &out,in
uint64_t Nsite = Umu.Grid()->oSites(); uint64_t Nsite = Umu.Grid()->oSites();
Kernels::DhopDirKernel(Stencil,Umu,Stencil.CommBuf(),Ls,Nsite,in,out,dirdisp,gamma); Kernels::DhopDirKernel(Stencil,Umu,Stencil.CommBuf(),Ls,Nsite,in,out,dirdisp,gamma);
}; };
template<class Impl> template<class Impl>
void WilsonFermion5D<Impl>::DhopDirAll(const FermionField &in, std::vector<FermionField> &out) void WilsonFermion5D<Impl>::DhopDirAll(const FermionField &in, std::vector<FermionField> &out)
@ -247,10 +246,14 @@ void WilsonFermion5D<Impl>::DerivInternal(StencilImpl & st,
Kernels::DhopDirKernel(st, U, st.CommBuf(), Ls, Usites, B, Btilde, mu,gamma); Kernels::DhopDirKernel(st, U, st.CommBuf(), Ls, Usites, B, Btilde, mu,gamma);
std::cout << " InsertForce Btilde "<< norm2(Btilde)<<std::endl;
//////////////////////////// ////////////////////////////
// spin trace outer product // spin trace outer product
//////////////////////////// ////////////////////////////
Impl::InsertForce5D(mat, Btilde, Atilde, mu); Impl::InsertForce5D(mat, Btilde, Atilde, mu);
std::cout << " InsertForce "<< norm2(mat)<<std::endl;
} }
} }

View File

@ -119,13 +119,19 @@ public:
// X^dag Der_oe MeeInv Meo Y // X^dag Der_oe MeeInv Meo Y
// Use Mooee as nontrivial but gauge field indept // Use Mooee as nontrivial but gauge field indept
this->_Mat.MeooeDag (V,tmp1); // odd->even -- implicit -0.5 factor to be applied this->_Mat.MeooeDag (V,tmp1); // odd->even -- implicit -0.5 factor to be applied
std::cout << " tmp 1" << norm2(tmp1)<<std::endl;
this->_Mat.MooeeInvDag(tmp1,tmp2); // even->even this->_Mat.MooeeInvDag(tmp1,tmp2); // even->even
std::cout << " tmp 1" << norm2(tmp2)<<std::endl;
this->_Mat.MoeDeriv(ForceO,U,tmp2,DaggerYes); this->_Mat.MoeDeriv(ForceO,U,tmp2,DaggerYes);
std::cout << " ForceO " << norm2(ForceO)<<std::endl;
// Accumulate X^dag M_oe MeeInv Der_eo Y // Accumulate X^dag M_oe MeeInv Der_eo Y
this->_Mat.Meooe (U,tmp1); // even->odd -- implicit -0.5 factor to be applied this->_Mat.Meooe (U,tmp1); // even->odd -- implicit -0.5 factor to be applied
std::cout << " tmp 1" << norm2(tmp1)<<std::endl;
this->_Mat.MooeeInv(tmp1,tmp2); // even->even this->_Mat.MooeeInv(tmp1,tmp2); // even->even
std::cout << " tmp 2" << norm2(tmp2)<<std::endl;
this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerYes); this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerYes);
std::cout << " ForceE " << norm2(ForceE)<<std::endl;
assert(ForceE.Checkerboard()==Even); assert(ForceE.Checkerboard()==Even);
assert(ForceO.Checkerboard()==Odd); assert(ForceO.Checkerboard()==Odd);

View File

@ -85,7 +85,7 @@ int main(int argc, char **argv) {
TheHMC.Resources.AddObservable<PlaqObs>(); TheHMC.Resources.AddObservable<PlaqObs>();
////////////////////////////////////////////// //////////////////////////////////////////////
const int Ls = 4; const int Ls = 8;
Real beta = 2.13; Real beta = 2.13;
Real light_mass = 0.01; Real light_mass = 0.01;
Real strange_mass = 0.04; Real strange_mass = 0.04;