00001
00002
00003
00004
00005
00006
00007 #ifndef __plaq_plus_spatial_two_plaq_gaugeact_h__
00008 #define __plaq_plus_spatial_two_plaq_gaugeact_h__
00009
00010 #include "gaugeact.h"
00011 #include "gaugebc.h"
00012 #include "io/aniso_io.h"
00013
00014 namespace Chroma
00015 {
00016
00017
00018 namespace PlaqPlusSpatialTwoPlaqGaugeActEnv
00019 {
00020 extern const string name;
00021 bool registerAll();
00022 extern double getTime();
00023 }
00024
00025
00026
00027 struct PlaqPlusSpatialTwoPlaqGaugeActParams
00028 {
00029
00030 PlaqPlusSpatialTwoPlaqGaugeActParams() {}
00031
00032
00033 PlaqPlusSpatialTwoPlaqGaugeActParams(XMLReader& xml_in, const std::string& path);
00034
00035 Real coeff_plaq_s;
00036 Real coeff_plaq_t;
00037
00038 Real coeff_two_plaq;
00039 AnisoParam_t aniso;
00040 };
00041
00042
00043 void read(XMLReader& xml, const string& path, PlaqPlusSpatialTwoPlaqGaugeActParams& param);
00044
00045
00046
00047
00048
00049
00050
00051
00052 class PlaqPlusSpatialTwoPlaqGaugeAct : public LinearGaugeAction
00053 {
00054 public:
00055
00056 PlaqPlusSpatialTwoPlaqGaugeAct(Handle< CreateGaugeState<P,Q> > cgs_,
00057 const Real& coeff_plaq_s_,
00058 const Real& coeff_plaq_t_,
00059 const Real& coeff_two_plaq_,
00060 const AnisoParam_t& aniso) :
00061 cgs(cgs_) {
00062 param.coeff_plaq_s = coeff_plaq_s_;
00063 param.coeff_plaq_t = coeff_plaq_t_;
00064 param.coeff_two_plaq = coeff_two_plaq_;
00065 param.aniso = aniso;
00066 init();
00067 }
00068
00069
00070 PlaqPlusSpatialTwoPlaqGaugeAct(Handle< CreateGaugeState<P,Q> > cgs_,
00071 const PlaqPlusSpatialTwoPlaqGaugeActParams& p) :
00072 cgs(cgs_), param(p) {init();}
00073
00074
00075 bool anisoP() const {return param.aniso.anisoP;}
00076
00077
00078 const Real anisoFactor() const {return param.aniso.xi_0;}
00079
00080
00081 int tDir() const {return param.aniso.t_dir;}
00082
00083
00084
00085 const Set& getSet() const {return rb;}
00086
00087
00088 void staple(LatticeColorMatrix& result,
00089 const Handle< GaugeState<P,Q> >& state,
00090 int mu, int cb) const;
00091
00092
00093 void deriv(multi1d<LatticeColorMatrix>& result,
00094 const Handle< GaugeState<P,Q> >& state) const;
00095
00096
00097 const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
00098
00099
00100 Double S(const Handle< GaugeState<P,Q> >& state) const;
00101
00102
00103 ~PlaqPlusSpatialTwoPlaqGaugeAct() {}
00104
00105
00106 const Real getCoeffPlaqS(void) const {return param.coeff_plaq_s;}
00107 const Real getCoeffPlaqT(void) const {return param.coeff_plaq_t;}
00108 const Real getCoeffTwoPlaq(void) const {return param.coeff_two_plaq;}
00109
00110 protected:
00111 PlaqPlusSpatialTwoPlaqGaugeAct() {}
00112 void operator=(const PlaqPlusSpatialTwoPlaqGaugeAct& a) {}
00113
00114
00115 void init();
00116
00117 private:
00118 Handle< CreateGaugeState<P,Q> > cgs;
00119 PlaqPlusSpatialTwoPlaqGaugeActParams param;
00120
00121 };
00122
00123 };
00124
00125
00126 #endif