Bridge++
Ver. 1.1.x
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
fopr_CloverTerm.h
Go to the documentation of this file.
1
14
#ifndef FOPR_CLOVERTERM_INCLUDED
15
#define FOPR_CLOVERTERM_INCLUDED
16
17
#include "
fopr_Wilson.h
"
18
#include "
shiftField_lex.h
"
19
#include "
gammaMatrixSet.h
"
20
#include "
staples.h
"
21
22
#include "
bridgeIO.h
"
23
using
Bridge::vout
;
24
26
43
//- parameters class
44
class
Parameters_Fopr_CloverTerm
:
virtual
public
Parameters
45
{
46
public
:
47
Parameters_Fopr_CloverTerm
();
48
};
49
//- end
50
51
class
Fopr_CloverTerm
:
public
Fopr
52
{
53
private
:
54
double
m_kappa
;
55
double
m_cSW
;
56
std::valarray<int>
m_boundary
;
57
std::string
m_repr
;
58
std::string
m_mode
;
59
void (
Fopr_CloverTerm
::*
m_csw
) (
Field
&,
const
Field
&);
60
void (
Fopr_CloverTerm
::*
m_gm5
) (
Field
&,
const
Field
&);
61
62
int
m_Nvol
,
m_Ndim
,
m_Nc
,
m_Nd
,
m_NinF
;
63
64
const
Field_G
*
m_U
;
65
ShiftField_lex
m_shift
;
66
67
Field_G
m_Bx
,
m_By
,
m_Bz
,
m_Ex
,
m_Ey
,
m_Ez
;
68
// Bx = -iF(1,2), By = -iF(2,1), -iBz = F(0,1)
69
// Ex = -iF(4,0), Ey = -iF(4,1), Ez = -iF(4,2)
70
71
std::valarray<GammaMatrix>
m_SG
;
72
GammaMatrix
m_GM5
;
73
74
public
:
75
Fopr_CloverTerm
()
76
:
Fopr
()
77
{
78
init
(
"Dirac"
);
79
}
80
81
Fopr_CloverTerm
(std::string repr)
82
:
Fopr
()
83
{
84
init
(repr);
85
}
86
87
~Fopr_CloverTerm
()
88
{
89
tidyup
();
90
}
91
92
void
set_parameters
(
const
Parameters
& params);
93
void
set_parameters
(
double
kappa,
double
cSW, std::valarray<int> bc);
94
void
set_config
(
Field
*U);
95
96
void
set_mode
(std::string mode)
97
{
98
m_mode
= mode;
99
}
100
101
std::string
get_mode
()
const
102
{
103
return
m_mode
;
104
}
105
106
const
Field
mult
(
const
Field
& f)
107
{
108
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
109
110
mult
(v, f);
111
return
v;
112
}
113
114
const
Field
mult_dag
(
const
Field
& f)
115
{
116
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
117
118
mult_dag
(v, f);
119
return
v;
120
}
121
122
void
mult
(
Field
& v,
const
Field
& f)
123
{
124
if
(
m_mode
==
"D"
) {
125
mult_sigmaF
(v, f);
126
// } else if(m_mode=="H"){
127
// H(v,f);
128
}
else
{
129
vout
.
crucial
(
"Fopr_CloverTerm: undefined mode = %s\n"
,
m_mode
.c_str());
130
abort();
131
}
132
}
133
134
void
mult_dag
(
Field
& v,
const
Field
& f)
135
{
136
mult
(v, f);
137
}
138
139
void
mult_sigmaF
(
Field
&,
const
Field
&);
140
141
const
Field
mult_gm5
(
const
Field
& f)
142
{
143
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
144
145
mult_gm5
(v, f);
146
return
v;
147
}
148
149
void
mult_gm5
(
Field
& v,
const
Field
& w);
150
151
void
mult_isigma
(
Field_F
&,
const
Field_F
&,
152
const
int
mu,
const
int
nu);
153
154
int
field_nvol
() {
return
m_Nvol
; }
155
int
field_nin
() {
return
2 *
m_Nc
*
m_Nd
; }
156
int
field_nex
() {
return
1; }
157
158
private
:
159
160
void
init
(std::string repr);
161
void
tidyup
();
162
163
void
set_csw
();
164
void
set_fieldstrength
(
Field_G
&,
const
int
,
const
int
);
165
166
void
gm5_dirac
(
Field
&,
const
Field
&);
167
void
gm5_chiral
(
Field
&,
const
Field
&);
168
169
void
mult_csw
(
Field
&,
const
Field
&);
170
void
mult_csw_dirac
(
Field
&,
const
Field
&);
171
void
mult_csw_chiral
(
Field
&,
const
Field
&);
172
173
void
mult_csw_dirac
(
Field_F
&,
const
Field_F
&);
174
void
mult_csw_chiral
(
Field_F
&,
const
Field_F
&);
175
176
int
sg_index
(
int
mu,
int
nu) {
return
mu *
m_Ndim
+ nu; }
177
};
178
#endif
src
Fopr
fopr_CloverTerm.h
Generated on Tue Jul 23 2013 10:48:48 for Bridge++ by
1.8.3.1