aniso_spectrum_gaugeact.cc

Go to the documentation of this file.
00001 // $Id: aniso_spectrum_gaugeact.cc,v 1.7 2006/09/20 20:28:00 edwards Exp $
00002 /*! \file
00003  *  \brief Anisotropic gaugeact useful for spectrum from hep-lat/9911003
00004  *
00005  *  Tree-level LW with tapole improvement, missing 1x2 in time, also including
00006  *  2-plaq term. Taken from Morningstar-Peardon, hep-lat/9911003
00007  */
00008 
00009 #include "chromabase.h"
00010 #include "actions/gauge/gaugeacts/aniso_spectrum_gaugeact.h"
00011 #include "actions/gauge/gaugeacts/gaugeact_factory.h"
00012 #include "actions/gauge/gaugestates/gauge_createstate_aggregate.h"
00013 
00014 namespace Chroma
00015 {
00016  
00017   namespace AnisoSpectrumGaugeActEnv 
00018   { 
00019     GaugeAction< multi1d<LatticeColorMatrix>, 
00020                  multi1d<LatticeColorMatrix> >* createGaugeAct(XMLReader& xml, 
00021                                                                const std::string& path) 
00022     {
00023       return new AnisoSpectrumGaugeAct(CreateGaugeStateEnv::reader(xml, path), 
00024                                        AnisoSpectrumGaugeActParams(xml, path));
00025     }
00026 
00027     const std::string name = "ANISO_SPECTRUM_GAUGEACT";
00028 
00029     //! Local registration flag
00030     static bool registered = false;
00031 
00032     //! Register all the factories
00033     bool registerAll() 
00034     {
00035       bool success = true; 
00036       if (! registered)
00037       {
00038         success &= TheGaugeActFactory::Instance().registerObject(name, createGaugeAct);
00039         registered = true;
00040       }
00041       return success;
00042     }
00043 
00044   }
00045 
00046 
00047   AnisoSpectrumGaugeActParams::AnisoSpectrumGaugeActParams(XMLReader& xml_in, const std::string& path) 
00048   {
00049     XMLReader paramtop(xml_in, path);
00050 
00051     try 
00052     {
00053       read(paramtop, "beta", beta);
00054       read(paramtop, "u_s", u_s);
00055       read(paramtop, "u_t", u_t);
00056       read(paramtop, "omega", omega);
00057       read(paramtop, "AnisoParam", aniso);
00058     }
00059     catch( const std::string& e ) { 
00060       QDPIO::cerr << "Error reading XML: " <<  e << endl;
00061       QDP_abort(1);
00062     }
00063   }
00064 
00065 
00066   void read(XMLReader& xml, const string& path, AnisoSpectrumGaugeActParams& p) 
00067   {
00068     AnisoSpectrumGaugeActParams tmp(xml, path);
00069     p=tmp;
00070   }
00071 
00072   void write(XMLWriter& xml, const string& path, const AnisoSpectrumGaugeActParams& param) 
00073   {
00074     push(xml, path);
00075 
00076     write(xml, "beta", param.beta);
00077     write(xml, "u_s", param.u_s);
00078     write(xml, "u_t", param.u_t);
00079     write(xml, "omega", param.omega);
00080     write(xml, "AnisoParam", param.aniso);
00081 
00082     pop(xml);
00083   }
00084 
00085 
00086   // Private initializer
00087   void
00088   AnisoSpectrumGaugeAct::init(Handle< CreateGaugeState<P,Q> > cgs)
00089   {
00090     START_CODE();
00091 
00092     // Do the plaquette first. Spatial and temporal coeffs
00093     // anisotropy multiplied in in the terms constructor
00094 
00095     // Various tadpole things
00096     // spatial powers
00097     Real u_s_2 = param.u_s * param.u_s;
00098     Real u_s_4 = u_s_2 * u_s_2;
00099     Real u_s_6 = u_s_4 * u_s_2;
00100     Real u_s_8 = u_s_4 * u_s_4;
00101 
00102     // temporal powers
00103     Real u_t_2 = param.u_t * param.u_t;
00104     Real u_t_4 = u_t_2 * u_t_2;
00105 
00106     // Coefficients for the plaquette term (eq 4 in hep-lat/9911003)
00107     Real plaq_c_s = param.beta * Real(5) * ( Real(1) + param.omega ) / ( Real(3) * u_s_4 );
00108     Real plaq_c_t = param.beta * Real(4) / ( Real(3) * u_s_2 * u_t_2 );
00109 
00110     //    plaq = new PlaqGaugeAct(cgs, plaq_c_s, plaq_c_t, param.aniso);
00111 
00112     // Coefficient of 2 plaquette spatial adjoint like thingie
00113     Real coeff_2plaq = Real(-5)*param.beta*param.omega/(Real(3)*u_s_8);
00114     plaq_plus_two_plaq = new PlaqPlusSpatialTwoPlaqGaugeAct(cgs, 
00115                                                             plaq_c_s,
00116                                                             plaq_c_t,
00117                                                             coeff_2plaq, 
00118                                                             param.aniso);
00119     // Coefficients for the rectangle 
00120     Real rect_c_s = - param.beta / ( Real(12)*u_s_6 );
00121     
00122     // Loops that are short in the time direction
00123     Real rect_c_t_2 = - param.beta / ( Real(12)*u_s_4*u_t_2);
00124 
00125     // Loops that are long int the time direction ought to be ommitted
00126     bool no_temporal_2link = true;
00127     Real rect_c_t_1 = 0; // Specify a zero coefficient (skipped anyway)
00128 
00129     rect = new RectGaugeAct(cgs, rect_c_s, rect_c_t_1, rect_c_t_2, no_temporal_2link, param.aniso);
00130     
00131     END_CODE();
00132   } 
00133 
00134 }
00135 

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