aniso_sym_gaugeact_params.cc

Go to the documentation of this file.
00001 // $Id: aniso_sym_gaugeact_params.cc,v 3.2 2008/05/21 17:07:49 bjoo 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 
00011 #include "actions/gauge/gaugeacts/aniso_sym_gaugeact_params.h"
00012 
00013 namespace Chroma
00014 {
00015  
00016   
00017   AnisoSymGaugeActParams::AnisoSymGaugeActParams(XMLReader& xml_in, const std::string& path) 
00018   {
00019     XMLReader paramtop(xml_in, path);
00020 
00021     try 
00022     {
00023       read(paramtop, "beta", beta);
00024       read(paramtop, "u_s", u_s);
00025       read(paramtop, "u_t", u_t);
00026       read(paramtop, "AnisoParam", aniso);
00027       if( paramtop.count("ZeroEnergy") == 1 ) {
00028         read(paramtop, "ZeroEnergy", sub_zero);
00029         use_subtraction = true;
00030       }
00031       else { 
00032         sub_zero = Real(0);
00033         use_subtraction = false;
00034       }
00035     }
00036     catch( const std::string& e ) { 
00037       QDPIO::cerr << "Error reading XML: " <<  e << endl;
00038       QDP_abort(1);
00039     }
00040   }
00041 
00042 
00043   void read(XMLReader& xml, const string& path, AnisoSymGaugeActParams& p) 
00044   {
00045     AnisoSymGaugeActParams tmp(xml, path);
00046     p=tmp;
00047   }
00048 
00049   void write(XMLWriter& xml, const string& path, const AnisoSymGaugeActParams& param) 
00050   {
00051     push(xml, path);
00052 
00053     write(xml, "beta", param.beta);
00054     write(xml, "u_s", param.u_s);
00055     write(xml, "u_t", param.u_t);
00056     if( param.use_subtraction ) { 
00057       write(xml, "ZeroEnergy", param.sub_zero);
00058     }
00059     write(xml, "AnisoParam", param.aniso);
00060 
00061     pop(xml);
00062   }
00063 
00064   AnisoSymSpatialGaugeActParams::AnisoSymSpatialGaugeActParams(XMLReader& xml_in, const std::string& path) 
00065   {
00066     XMLReader paramtop(xml_in, path);
00067 
00068     try 
00069     {
00070       read(paramtop, "beta", beta);
00071       read(paramtop, "u_s", u_s);
00072       if( paramtop.count("ZeroEnergy") == 1 ) {
00073         read(paramtop, "ZeroEnergy", sub_zero);
00074         use_subtraction = true;
00075       }
00076       else { 
00077         sub_zero = Real(0);
00078         use_subtraction = false;
00079       }
00080       read(paramtop, "AnisoParam", aniso);
00081     }
00082     catch( const std::string& e ) { 
00083       QDPIO::cerr << "Error reading XML: " <<  e << endl;
00084       QDP_abort(1);
00085     }
00086   }
00087 
00088 
00089   void read(XMLReader& xml, const string& path, AnisoSymSpatialGaugeActParams& p) 
00090   {
00091     AnisoSymSpatialGaugeActParams tmp(xml, path);
00092     p=tmp;
00093   }
00094 
00095   void write(XMLWriter& xml, const string& path, const AnisoSymSpatialGaugeActParams& param) 
00096   {
00097     push(xml, path);
00098 
00099     write(xml, "beta", param.beta);
00100     write(xml, "u_s", param.u_s);
00101     if( param.use_subtraction ) { 
00102       write(xml, "ZeroEnergy", param.sub_zero);
00103     }
00104     write(xml, "AnisoParam", param.aniso);
00105 
00106     pop(xml);
00107   }
00108 
00109 }
00110 

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