mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-11 03:46:55 +01:00
Debugging smeared HMC
This commit is contained in:
@ -94,7 +94,7 @@ public:
|
||||
// Smearing policy
|
||||
std::cout << GridLogMessage << " Creating the Stout class\n";
|
||||
double rho = 0.1; // smearing parameter
|
||||
int Nsmear = 3; // number of smearing levels
|
||||
int Nsmear = 1; // number of smearing levels
|
||||
Smear_Stout<Gimpl> Stout(rho);
|
||||
std::cout << GridLogMessage << " Creating the SmearedConfiguration class\n";
|
||||
SmearedConfiguration<Gimpl> SmearingPolicy(UGrid, Nsmear, Stout);
|
||||
@ -144,7 +144,7 @@ public:
|
||||
|
||||
// Attach the gauge field to the smearing Policy and create the fill the smeared set
|
||||
// notice that the unit configuration is singular in this procedure
|
||||
std::cout << GridLogMessage << " Filling the smeared set\n";
|
||||
std::cout << GridLogMessage << "Filling the smeared set\n";
|
||||
SmearingPolicy.set_GaugeField(U);
|
||||
|
||||
HybridMonteCarlo<GaugeField,IntegratorType> HMC(HMCpar, MDynamics,sRNG,pRNG,U);
|
||||
|
@ -115,10 +115,12 @@ namespace Grid{
|
||||
void update_P(GaugeField &Mom,GaugeField&U, int level,double ep){
|
||||
for(int a=0; a<as[level].actions.size(); ++a){
|
||||
GaugeField force(U._grid);
|
||||
as[level].actions.at(a)->deriv(U,force); // deriv should not include Ta
|
||||
GaugeField& Us = Smearer.get_U(as[level].actions.at(a)->is_smeared);
|
||||
as[level].actions.at(a)->deriv(Us,force); // deriv should not include Ta
|
||||
std::cout<<GridLogIntegrator<< "Smearing (on/off): "<<as[level].actions.at(a)->is_smeared <<std::endl;
|
||||
if (as[level].actions.at(a)->is_smeared) Smearer.smeared_force(force);
|
||||
force = Ta(force);
|
||||
std::cout<<GridLogIntegrator<< "Force average: "<< norm2(force)/(U._grid->gSites()) <<std::endl;
|
||||
Mom = Mom - force*ep;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user