00001
00002
00003
00004
00005
00006 #include "chromabase.h"
00007 #include "actions/gauge/gaugeacts/aniso_sym_temporal_gaugeact.h"
00008 #include "actions/gauge/gaugeacts/gaugeact_factory.h"
00009 #include "actions/gauge/gaugestates/gauge_createstate_aggregate.h"
00010
00011 #include "actions/gauge/gaugeacts/aniso_sym_shared_functions.h"
00012 namespace Chroma
00013 {
00014
00015 namespace AnisoSymTemporalGaugeActEnv
00016 {
00017 GaugeAction< multi1d<LatticeColorMatrix>,
00018 multi1d<LatticeColorMatrix> >* createGaugeAct(XMLReader& xml,
00019 const std::string& path)
00020 {
00021 return new AnisoSymTemporalGaugeAct(CreateGaugeStateEnv::reader(xml, path),
00022 AnisoSymGaugeActParams(xml, path));
00023 }
00024
00025 const std::string name = "ANISO_SYM_TEMPORAL_GAUGEACT";
00026
00027
00028 static bool registered = false;
00029
00030
00031 bool registerAll()
00032 {
00033 bool success = true;
00034 if (! registered)
00035 {
00036 success &= TheGaugeActFactory::Instance().registerObject(name, createGaugeAct);
00037 registered = true;
00038 }
00039 return success;
00040 }
00041
00042 }
00043
00044
00045
00046 Double AnisoSymTemporalGaugeAct::S(const Handle< GaugeState<P,Q> >& state) const
00047 {
00048 START_CODE();
00049
00050 const multi1d<LatticeColorMatrix>& u_bc = state->getLinks();
00051
00052 LatticeReal lgimp = zero;
00053
00054 int mu;
00055 int nu;
00056
00057
00058 nu = param.aniso.t_dir;
00059 for(mu=0; mu < Nd; mu++) {
00060 if( mu != nu ) {
00061 AnisoSym::S_part(mu,
00062 nu,
00063 param.aniso.t_dir,
00064 plaq_c_t,
00065 rect_c_t_2,
00066 true,
00067 lgimp,
00068 u_bc);
00069 }
00070 }
00071
00072
00073
00074
00075
00076 mu = param.aniso.t_dir;
00077 for(int nu=0; nu < Nd; nu++) {
00078 if( mu != nu ) {
00079 AnisoSym::S_part(mu,
00080 nu,
00081 param.aniso.t_dir,
00082 plaq_c_t,
00083 rect_c_t_2,
00084 true,
00085 lgimp,
00086 u_bc);
00087 }
00088 }
00089
00090
00091
00092 if( param.use_subtraction ) {
00093 LatticeReal ff;
00094 ff = param.sub_zero;
00095 lgimp -= ff;
00096 }
00097
00098 Double ret_val = sum(lgimp);
00099
00100
00101 ret_val *= -Double(1)/Double(Nc);
00102
00103 END_CODE();
00104
00105 return ret_val;
00106 }
00107
00108
00109 void AnisoSymTemporalGaugeAct::deriv(multi1d<LatticeColorMatrix>& result,
00110 const Handle< GaugeState<P,Q> >& state) const
00111 {
00112 result.resize(Nd);
00113 int mu;
00114 int nu;
00115
00116 multi1d<LatticeColorMatrix> ds_tmp(Nd);
00117
00118
00119 const multi1d<LatticeColorMatrix>& u_bc = state->getLinks();
00120
00121 for(mu=0; mu < Nd; mu++) {
00122 result[mu] =zero;
00123 ds_tmp[mu]= zero;
00124 }
00125
00126
00127
00128 nu = param.aniso.t_dir;
00129 for(mu=0; mu < Nd; mu++) {
00130 if( mu != nu ) {
00131 AnisoSym::deriv_part(mu,
00132 nu,
00133 param.aniso.t_dir,
00134 plaq_c_t,
00135 rect_c_t_2,
00136 true,
00137 ds_tmp,
00138 u_bc);
00139
00140 }
00141 }
00142
00143
00144
00145
00146
00147 mu = param.aniso.t_dir;
00148 for(int nu=0; nu < Nd; nu++) {
00149 if( mu != nu ) {
00150 AnisoSym::deriv_part(mu,
00151 nu,
00152 param.aniso.t_dir,
00153 plaq_c_t,
00154 rect_c_t_2,
00155 true,
00156 ds_tmp,
00157 u_bc);
00158
00159 }
00160 }
00161
00162
00163 for(int mu=0; mu < Nd; mu++) {
00164 result[mu] = u_bc[mu]*ds_tmp[mu];
00165 }
00166
00167
00168 getGaugeBC().zero(result);
00169
00170 END_CODE();
00171
00172 }
00173
00174
00175 void
00176 AnisoSymTemporalGaugeAct::init(void)
00177 {
00178 START_CODE();
00179
00180
00181
00182
00183
00184
00185 Real u_s_2 = param.u_s * param.u_s;
00186 Real u_s_4 = u_s_2 * u_s_2;
00187
00188
00189 Real u_t_2 = param.u_t * param.u_t;
00190
00191
00192 plaq_c_t = param.beta * Real(4) / ( Real(3) * u_s_2 * u_t_2 );
00193
00194
00195
00196 rect_c_t_2 = - param.beta / ( Real(12)*u_s_4*u_t_2);
00197
00198
00199 if( param.aniso.anisoP ) {
00200 plaq_c_t *= param.aniso.xi_0;
00201 rect_c_t_2 *= param.aniso.xi_0;
00202 }
00203
00204 QDPIO::cout << "Real(Nc)*(u_s_2*u_t_2+u_s_4*u_t_2)="<<Real(Nc)*( Real(3)*u_s_2*u_t_2/Real(4)-Real(12)*u_s_4*u_t_2)/param.beta << endl;
00205 END_CODE();
00206 }
00207
00208 }
00209