00001
00006
00007
00008 #ifndef __ROTATEGAUGE__CD
00009 #define __ROTATEGAUGE__CD
00010
00011 #include <util/lattice.h>
00012 #include <alg/alg_base.h>
00013 #include <alg/common_arg.h>
00014 #include <util/vector.h>
00015
00016 CPS_START_NAMESPACE
00017
00018
00019
00021
00032 class AlgRandomGauge: public Alg
00033 {
00034 private:
00035
00036 char *cname;
00037
00039 Float theta;
00040
00041
00042 void printMatrix( const Matrix& x );
00043
00044 void RandMatrix( Float theta , Matrix& x , int sub );
00045
00046 void UpperRandMatrix( Float theta , Matrix& x ) {
00047 RandMatrix( theta, x, 0 );
00048 }
00049
00050 void LowerRandMatrix( Float theta , Matrix& x ) {
00051 RandMatrix( theta, x, 1 );
00052 }
00053
00054 void MixedRandMatrix( Float theta , Matrix& x ) {
00055 RandMatrix( theta, x, 2 );
00056 }
00057
00058 int NX, NY, NZ, NT;
00059 int index(int, int, int, int);
00060
00061 public:
00062
00063 AlgRandomGauge ( Lattice& latt , CommonArg *c_arg );
00064
00065
00070 ~AlgRandomGauge() {;}
00071
00073
00076 void set_theta( Float t ) { theta=t; }
00077
00079 void run();
00080
00082
00088 void free() { AlgLattice().FixGaugeFree(); }
00089 };
00090
00091
00093
00102 class AlgRotateGauge : public Alg
00103 {
00104 private:
00105
00106 char *cname;
00107 int NX, NY, NZ, NT;
00108 int index(int, int, int, int, int);
00109
00110 public:
00111
00117 AlgRotateGauge( Lattice& latt, CommonArg *c_arg ):
00118 Alg(latt,c_arg),
00119 cname("RotateGauge")
00120 {;}
00121
00122 ~AlgRotateGauge() {;}
00123
00124
00125 void run();
00126
00127
00128 private:
00129
00134 Matrix GetMat(const Matrix *m_offset, const int *x, int nu,
00135 const int *node_sites, const int *m_dir_offset);
00136
00137 };
00138
00139 CPS_END_NAMESPACE
00140 #endif
00141
00142
00143
00144