00001
00002
00003
00004
00005
00006
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
00030 static bool registered = false;
00031
00032
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
00087 void
00088 AnisoSpectrumGaugeAct::init(Handle< CreateGaugeState<P,Q> > cgs)
00089 {
00090 START_CODE();
00091
00092
00093
00094
00095
00096
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
00103 Real u_t_2 = param.u_t * param.u_t;
00104 Real u_t_4 = u_t_2 * u_t_2;
00105
00106
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
00111
00112
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
00120 Real rect_c_s = - param.beta / ( Real(12)*u_s_6 );
00121
00122
00123 Real rect_c_t_2 = - param.beta / ( Real(12)*u_s_4*u_t_2);
00124
00125
00126 bool no_temporal_2link = true;
00127 Real rect_c_t_1 = 0;
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