1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 13:57:07 +01:00

HMC for Adjoint fermions works

Accepts and reproduces known results

Check initial instability of inverters
when starting from hot configurations
This commit is contained in:
Guido Cossu
2016-08-30 11:31:25 +01:00
parent 9c2e8d5e28
commit b512ccbee6
8 changed files with 45 additions and 57 deletions

View File

@ -65,14 +65,15 @@ class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > {
AdjointRepresentation::LatticeField U(UGrid);
// Gauge action
WilsonGaugeActionR Waction(2.0);
WilsonGaugeActionR Waction(2.25);
Real mass = -1.0;
Real mass = -0.95;
FermionAction FermOp(U, *FGrid, *FrbGrid, mass);
ConjugateGradient<FermionField> CG(1.0e-8, 10000);
ConjugateResidual<FermionField> CR(1.0e-8, 10000);
// Pass two solvers: one for the force computation and one for the action
TwoFlavourPseudoFermionAction<ImplPolicy> Nf2(FermOp, CG, CG);
// Set smearing (true/false), default: false

View File

@ -121,6 +121,7 @@ int main(int argc, char** argv) {
// Test group structure
// (U_f * V_f)_r = U_r * V_r
LatticeGaugeField UV(grid);
UV = zero;
for (int mu = 0; mu < Nd; mu++) {
SU<Nc>::LatticeMatrix Umu = peekLorentz(U,mu);
SU<Nc>::LatticeMatrix Vmu = peekLorentz(V,mu);
@ -138,6 +139,7 @@ int main(int argc, char** argv) {
typename AdjointRep<Nc>::LatticeField Vr = AdjRep.U; // V_r
typename AdjointRep<Nc>::LatticeField UrVr(grid);
UrVr = zero;
for (int mu = 0; mu < Nd; mu++) {
typename AdjointRep<Nc>::LatticeMatrix Urmu = peekLorentz(Ur,mu);
typename AdjointRep<Nc>::LatticeMatrix Vrmu = peekLorentz(Vr,mu);
@ -145,9 +147,9 @@ int main(int argc, char** argv) {
}
typename AdjointRep<Nc>::LatticeField Diff_check = UVr - UrVr;
std::cout << GridLogMessage << "Group structure check difference : " << norm2(Diff_check) << std::endl;
std::cout << GridLogMessage << "Group structure SU("<<Nc<<") check difference : " << norm2(Diff_check) << std::endl;
// Check correspondence of algebra and group transformations
// Check correspondence of algebra and group transformations
// Create a random vector
SU<Nc>::LatticeAlgebraVector h_adj(grid);
typename AdjointRep<Nc>::LatticeMatrix Ar(grid);

View File

@ -58,8 +58,8 @@ int main (int argc, char ** argv)
LatticeGaugeField U(&Grid);
SU2::HotConfiguration(pRNG,U);
// SU3::ColdConfiguration(pRNG,U);
//SU2::HotConfiguration(pRNG,U);
SU3::ColdConfiguration(pRNG,U);
////////////////////////////////////
// Unmodified matrix element
@ -95,7 +95,7 @@ int main (int argc, char ** argv)
for(int mu=0;mu<Nd;mu++){
SU2::GaussianFundamentalLieAlgebraMatrix(pRNG, mommu); // Traceless antihermitian momentum; gaussian in lie alg
SU3::GaussianFundamentalLieAlgebraMatrix(pRNG, mommu); // Traceless antihermitian momentum; gaussian in lie alg
Hmom -= real(sum(trace(mommu*mommu)));
@ -142,11 +142,13 @@ int main (int argc, char ** argv)
LatticeComplex dS(&Grid); dS = zero;
LatticeComplex dSmom(&Grid); dSmom = zero;
LatticeComplex dSmom2(&Grid); dSmom2 = zero;
for(int mu=0;mu<Nd;mu++){
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
mommu=Ta(mommu)*2.0;
PokeIndex<LorentzIndex>(UdSdU,mommu,mu);
}
for(int mu=0;mu<Nd;mu++){
mommu = PeekIndex<LorentzIndex>(mom,mu);
@ -170,7 +172,7 @@ int main (int argc, char ** argv)
dSmom2 = dSmom2 - trace(forcemu*forcemu) *(0.25* dt*dt);
// Update mom action density
mommu = mommu + forcemu*(dt*0.5);
mommu = mommu + forcemu*(dt * 0.5);
Hmomprime -= real(sum(trace(mommu*mommu)));