1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Adding some wilson loop support

This commit is contained in:
Azusa Yamaguchi
2015-06-05 10:02:36 +01:00
parent c851d0e705
commit 94ea84d83f
4 changed files with 196 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#ifndef QCD_GAUGE_ACTION_BASE
#define QCD_GAUGE_ACTION_BASE
namespace Grid {
namespace QCD{
template<class GaugeField>
class GaugeActionBase { // derive this from TermInAction?
public:
virtual RealD S(const GaugeField &U) = 0; // evaluate the action
virtual void deriv(const GaugeField &U,GaugeField & dSdU ) = 0; // evaluate the action derivative
virtual void staple(const GaugeField &U,GaugeField & dSdU ) = 0; // evaluate the action derivative
virtual void refresh(const GaugeField & ) {};
// Boundary conditions?
// Heatbath?
virtual ~GaugeActionBase() {};
};
}}
#endif

View File

@ -0,0 +1,24 @@
#ifndef QCD_WILSON_GAUGE_ACTION_H
#define QCD_WILSON_GAUGE_ACTION_H
////////////////////////////////////////////////////////////////////////
// Wilson Gauge Action .. should I template the Nc etc..
////////////////////////////////////////////////////////////////////////
template<class GaugeField,class MatrixField>
class WilsonGaugeAction : public GaugeActionBase<GaugeField> {
public:
virtual RealD S(const GaugeField &U) {
return WilsonLoops<MatrixField,GaugeField>::sumPlaquette(U);
};
virtual RealD deriv(GaugeField &U,GaugeField & dSdU ) {
WilsonLoops<MatrixField,GaugeField>::Staple(dSdU,U,mu);
};
virtual void staple(const MatrixField &stap,GaugeField & U,int mu ) {
WilsonLoops<MatrixField,GaugeField>::Staple(stap,U,mu);
};
};
#endif
#endif