1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-20 08:46:55 +01:00

Two flavour HMC for Wilson/Wilson is conserving energy.

Still to check plaq and <e(-dH)>, but nevertheless this is
progress
This commit is contained in:
Peter Boyle
2015-07-29 17:53:39 +09:00
parent f4c74e34d8
commit 0b603225d1
20 changed files with 259 additions and 76 deletions

View File

@ -65,6 +65,18 @@ namespace Grid{
for(int a=0; a<as[level].size(); ++a){
LatticeLorentzColourMatrix force(U._grid);
as[level].at(a)->deriv(U,force);
Complex dSdt=0.0;
for(int mu=0;mu<Nd;mu++){
LatticeColourMatrix forcemu(U._grid);
LatticeColourMatrix mommu(U._grid);
forcemu=PeekIndex<LorentzIndex>(force,mu);
mommu=PeekIndex<LorentzIndex>(*P,mu);
dSdt += sum(trace(forcemu*(*P)));
}
std::cout << GridLogMessage << " action "<<level<<","<<a<<" dSdt "<< dSdt << " dt "<<ep <<std::endl;
*P -= force*ep;
}
}