1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-05 03:35:55 +01:00

Fixing compilation errors for the WilsonFlow

This commit is contained in:
Guido Cossu 2017-03-21 13:06:32 +09:00
parent 18b7845b7b
commit 0ec6829edc
2 changed files with 11 additions and 8 deletions

View File

@ -5,5 +5,6 @@
#include <Grid/qcd/smearing/APEsmearing.h>
#include <Grid/qcd/smearing/StoutSmearing.h>
#include <Grid/qcd/smearing/GaugeConfiguration.h>
#include <Grid/qcd/smearing/WilsonFlow.h>
#endif

View File

@ -38,9 +38,9 @@ class WilsonFlow: public Smear<Gimpl>{
unsigned int Nstep;
RealD epsilon;
WilsonGaugeAction &SG;
WilsonGaugeAction<Gimpl> &SG;
void evolve_step();
void evolve_step(typename Gimpl::GaugeField&);
RealD tau(unsigned int t)const {return epsilon*(t+1.0); }
@ -74,7 +74,8 @@ class WilsonFlow: public Smear<Gimpl>{
RealD energyDensityPlaquette(unsigned int step, const GaugeField& U) const;
};
void WilsonFlow::evolve_step(GaugeField &U) {
template <class Gimpl>
void WilsonFlow<Gimpl>::evolve_step(typename Gimpl::GaugeField &U) {
GaugeField Z(U._grid);
GaugeField tmp(U._grid);
SG.deriv(U, Z);
@ -92,15 +93,15 @@ void WilsonFlow::evolve_step(GaugeField &U) {
Gimpl::update_field(Z, U, -2.0*epsilon); // V(t+e) = exp(ep*Z)*W2
}
RealD energyDensityPlaquette(unsigned int step, const GaugeField& U) const {
template <class Gimpl>
RealD WilsonFlow<Gimpl>::energyDensityPlaquette(unsigned int step, const GaugeField& U) const {
RealD td = tau(step);
return 2.0 * td * td * SG.S(Uflow)/volume;
return 2.0 * td * td * SG.S(U)/U._grid->gSites();
}
void WilsonFlow::smear(GaugeField& out, const GaugeField& in) const {
template <class Gimpl>
void WilsonFlow<Gimpl>::smear(GaugeField& out, const GaugeField& in) const {
out = in;
RealD volume = out._grid->gSites();
for (unsigned int step = 0; step < Nstep; step++) {
evolve_step(out);
// Energy density, plaquette
@ -110,6 +111,7 @@ void WilsonFlow::smear(GaugeField& out, const GaugeField& in) const {
<< " " << energyDensityPlaquette(step, out)
<< std::endl;
}
}
} // namespace QCD
} // namespace Grid