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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user