aniso_sym_spatial_gaugeact.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: aniso_sym_spatial_gaugeact.h,v 3.2 2007/05/24 19:36:05 bjoo Exp $
00003 /*! \file
00004  *  \brief Spatial part of Tree level LW action
00005  */
00006 
00007 #ifndef __aniso_sym_spatial_gaugeact_h__
00008 #define __aniso_sym_spatial_gaugeact_h__
00009 
00010 #include "gaugeact.h"
00011 #include "gaugebc.h"
00012 #include "actions/gauge/gaugeacts/plaq_gaugeact.h"
00013 #include "actions/gauge/gaugeacts/rect_gaugeact.h"
00014 #include "actions/gauge/gaugeacts/aniso_sym_gaugeact_params.h"
00015 
00016 
00017 namespace Chroma
00018 {
00019 
00020   /*! @ingroup gaugeacts */
00021   namespace AnisoSymSpatialGaugeActEnv 
00022   {
00023     extern const string name;
00024     bool registerAll();
00025   }
00026 
00027   //! Spatial anisotropic Symanzik improved gauge action
00028   /*! \ingroup gaugeacts
00029    *
00030    *   Contains space-space plaquette and space space rectangle terms
00031    *   only. Useful for when one wants to split the spatial and temporal
00032    *   parts of the general Symanzik gauge action onto different timescales
00033    *   in an (R)HMC simulation.
00034    */
00035 
00036   class AnisoSymSpatialGaugeAct : public LinearGaugeAction
00037   {
00038   public:
00039     // Typedefs to save typing
00040     typedef multi1d<LatticeColorMatrix>  P;
00041     typedef multi1d<LatticeColorMatrix>  Q;
00042 
00043     //! Read beta from a param struct
00044     AnisoSymSpatialGaugeAct(Handle< CreateGaugeState<P,Q> > cgs_, 
00045                           const AnisoSymSpatialGaugeActParams& p) :
00046       cgs(cgs_), param(p) {init();}
00047 
00048     //! Is anisotropy used?
00049     bool anisoP() const {return param.aniso.anisoP; }
00050 
00051     //! Anisotropy factor
00052     const Real anisoFactor() const {return param.aniso.xi_0;}
00053 
00054     //! Anisotropic direction
00055     int tDir() const {return param.aniso.t_dir;}
00056 
00057     //! Return the set on which the gauge action is defined
00058     /*! Defined on the even-off (red/black) set */
00059     const Set& getSet() const {return rb;}
00060 
00061     //! Compute staple
00062     /*! Default version. Derived class should override this if needed. */
00063     void staple(LatticeColorMatrix& result,
00064                 const Handle< GaugeState<P,Q> >& state,
00065                 int mu, int cb) const
00066     {
00067       QDPIO::cerr << "This function is not implemented" << endl;
00068       QDP_abort(1);
00069       
00070     }
00071 
00072     //! Compute dS/dU
00073     void deriv(multi1d<LatticeColorMatrix>& result,
00074                const Handle< GaugeState<P,Q> >& state) const;
00075       /*
00076         {
00077         plaq->derivSpatial(result,state,param.aniso.t_dir); 
00078         multi1d<LatticeColorMatrix> tmp;
00079         rect->derivSpatial(tmp,state);
00080         result += tmp;
00081         }
00082       */
00083     //! Compute the actions
00084     Double S(const Handle< GaugeState<P,Q> >& state) const;
00085     /*
00086     {
00087       return plaq->spatialS(state, param.aniso.t_dir) + rect->spatialS(state);
00088     }
00089     */
00090 
00091     //! Produce a gauge create state object
00092     const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
00093 
00094     //! Destructor is automatic
00095     ~AnisoSymSpatialGaugeAct() {}
00096 
00097     // Accessors -- non mutable members.
00098     const Real getBeta(void) const { return param.beta; }
00099     
00100     const Real getUS(void) const { return param.u_s; }
00101     
00102 
00103   protected:
00104     //! Private initializer
00105     //    void init(Handle< CreateGaugeState<P,Q> > cgs_);
00106     void init(void);
00107 
00108     //! Hide assignment
00109     void operator=(const AnisoSymSpatialGaugeAct& a) {}
00110 
00111   private:
00112     const Handle< CreateGaugeState<P,Q> > cgs;
00113     AnisoSymSpatialGaugeActParams    param;    /*!< The couplings and anisotropy*/
00114     //   Handle<PlaqGaugeAct>           plaq;     /*!< Hold a plaquette gaugeact */
00115     //   Handle<RectGaugeAct>           rect;     /*!< Hold a rectangle gaugeact */
00116 
00117     Real plaq_c_s;
00118     Real rect_c_s;
00119     
00120   };
00121 
00122 };
00123 
00124 
00125 #endif

Generated on Sun Nov 22 04:28:48 2009 for CHROMA by  doxygen 1.4.7