1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Now the gauge implementation has to take care of the Nexp

This commit is contained in:
Guido Cossu 2016-10-03 16:20:06 +01:00
parent 257f69f931
commit cfbc1a26b8
2 changed files with 8 additions and 6 deletions

View File

@ -49,8 +49,8 @@ template <class Gimpl> class WilsonLoops;
#define INHERIT_FIELD_TYPES(Impl) \
typedef typename Impl::Field Field;
template <class S, int Nrepresentation = Nc > class GaugeImplTypes {
// hard codes the exponential approximation in the template
template <class S, int Nrepresentation = Nc, int Nexp = 12 > class GaugeImplTypes {
public:
typedef S Simd;
@ -75,6 +75,7 @@ public:
}
}
// HMC auxiliary functions
static inline void generate_momenta(Field& P, GridParallelRNG& pRNG){
// specific for SU gauge fields
LinkField Pmu(P._grid);
@ -85,15 +86,15 @@ public:
}
}
static inline void update_field(Field& P, Field& U, double ep, unsigned int Nexp){
static inline void update_field(Field& P, Field& U, double ep){
for (int mu = 0; mu < Nd; mu++) {
auto Umu = PeekIndex<LorentzIndex>(U, mu);
auto Pmu = PeekIndex<LorentzIndex>(P, mu);
Umu = expMat(Pmu, ep, Nexp) * Umu;
PokeIndex<LorentzIndex>(U, ProjectOnGroup(Umu), mu);
}
}
static inline RealD FieldSquareNorm(Field& U){

View File

@ -155,7 +155,8 @@ class Integrator {
<< " dt " << ep << " : t_U " << t_U << std::endl;
}
void update_U(MomentaField& Mom, Field& U, double ep) {
FieldImplementation::update_field(Mom, U, ep, Params.Nexp);
// exponential of Mom*U in the gauge fields case
FieldImplementation::update_field(Mom, U, ep);
// Update the smeared fields, can be implemented as observer
Smearer.set_Field(U);