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_TMWilson.h
Go to the documentation of this file.
1
15
#ifndef FOPR_TMWILSON_INCLUDED
16
#define FOPR_TMWILSON_INCLUDED
17
18
#include "
fopr_Wilson.h
"
19
20
#include "
bridgeIO.h
"
21
using
Bridge::vout
;
22
24
33
//- parameters class
34
class
Parameters_Fopr_TMWilson
:
virtual
public
Parameters
35
{
36
public
:
37
Parameters_Fopr_TMWilson
();
38
};
39
//- end
40
41
class
Fopr_TMWilson
:
public
Fopr
42
{
43
private
:
44
int
m_Nvol
,
m_Ndim
;
45
double
m_kappa
,
m_tw_mass
;
46
std::valarray<int>
m_boundary
;
47
48
Fopr_Wilson
*
m_fopr_w
;
49
std::string
m_mode
;
50
std::string
m_repr
;
51
52
void (
Fopr_TMWilson
::*
m_mult
) (
Field
&,
const
Field
&);
53
void (
Fopr_TMWilson
::*
m_mult_dag
) (
Field
&,
const
Field
&);
54
55
const
Field_G
*
m_U
;
56
57
public
:
58
Fopr_TMWilson
()
59
:
Fopr
()
60
{
61
m_Nvol
=
CommonParameters::Nvol
();
62
m_Ndim
=
CommonParameters::Ndim
();
63
m_boundary
.resize(
m_Ndim
);
64
m_U
= 0;
65
m_mult
= &
Fopr_TMWilson::mult_undef
;
66
m_mult_dag
= &
Fopr_TMWilson::mult_undef
;
67
m_repr
=
"Dirac"
;
68
m_fopr_w
=
new
Fopr_Wilson
(
m_repr
);
69
}
70
71
Fopr_TMWilson
(std::string repr)
72
:
Fopr
()
73
{
74
m_Nvol
=
CommonParameters::Nvol
();
75
m_Ndim
=
CommonParameters::Ndim
();
76
m_boundary
.resize(
m_Ndim
);
77
m_U
= 0;
78
m_mult
= &
Fopr_TMWilson::mult_undef
;
79
m_mult_dag
= &
Fopr_TMWilson::mult_undef
;
80
m_repr
= repr;
81
m_fopr_w
=
new
Fopr_Wilson
(
m_repr
);
82
}
83
84
~Fopr_TMWilson
()
85
{
86
delete
m_fopr_w
;
87
}
88
89
void
set_parameters
(
const
Parameters
& params);
90
void
set_parameters
(
double
kappa,
double
tw_mass, std::valarray<int> bc);
91
92
void
set_config
(
Field
*U)
93
{
94
m_U
= (
Field_G
*)U;
95
m_fopr_w
->
set_config
(U);
96
}
97
98
const
Field
mult
(
const
Field
& f)
99
{
100
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
101
102
mult
(v, f);
103
return
v;
104
}
105
106
const
Field
mult_dag
(
const
Field
& f)
107
{
108
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
109
110
mult_dag
(v, f);
111
return
v;
112
}
113
114
void
mult
(
Field
& v,
const
Field
& f)
115
{
116
(this->*
m_mult
)(v, f);
117
}
118
119
void
mult_dag
(
Field
& v,
const
Field
& f)
120
{
121
(this->*
m_mult_dag
)(v, f);
122
}
123
124
void
set_mode
(std::string mode)
125
{
126
m_mode
= mode;
127
128
if
(
m_mode
==
"D"
) {
129
m_mult
= &
Fopr_TMWilson::D
;
130
m_mult_dag
= &
Fopr_TMWilson::Ddag
;
131
}
else
if
(
m_mode
==
"Ddag"
) {
132
m_mult
= &
Fopr_TMWilson::Ddag
;
133
m_mult_dag
= &
Fopr_TMWilson::D
;
134
}
else
if
(
m_mode
==
"DdagD"
) {
135
m_mult
= &
Fopr_TMWilson::DdagD
;
136
m_mult_dag
= &
Fopr_TMWilson::DdagD
;
137
}
else
if
(
m_mode
==
"H"
) {
138
m_mult
= &
Fopr_TMWilson::H
;
139
m_mult_dag
= &
Fopr_TMWilson::Hdag
;
140
}
else
{
141
vout
.
crucial
(
m_vl
,
"Fopr_TMWilson: input mode is undefined.\n"
);
142
abort();
143
}
144
}
145
146
std::string
get_mode
()
const
147
{
148
return
m_mode
;
149
}
150
151
const
Field
mult_gm5
(
const
Field
& f)
152
{
153
Field
v(f.
nin
(), f.
nvol
(), f.
nex
());
154
155
mult_gm5
(v, f);
156
return
v;
157
}
158
159
void
mult_gm5
(
Field
& v,
const
Field
& f)
160
{
161
m_fopr_w
->
mult_gm5
(v, f);
162
}
163
164
void
D
(
Field
&,
const
Field
&);
165
void
DdagD
(
Field
&,
const
Field
&);
166
void
Ddag
(
Field
&,
const
Field
&);
167
void
H
(
Field
&,
const
Field
&);
168
void
Hdag
(
Field
&,
const
Field
&);
169
170
void
mult_undef
(
Field
&,
const
Field
&)
171
{
172
vout
.
crucial
(
m_vl
,
"Fopr_TMWilson: input mode is undefined.\n"
);
173
abort();
174
}
175
176
const
Field_F
mult_gm5p
(
int
mu,
const
Field_F
& w)
177
{
178
return
m_fopr_w
->
mult_gm5p
(mu, w);
179
}
180
181
void
fprop_normalize
(
Field
& v)
182
{
183
m_fopr_w
->
fprop_normalize
(v);
184
}
185
186
void
fopr_normalize
(
Field
& v)
187
{
188
m_fopr_w
->
fopr_normalize
(v);
189
}
190
191
int
field_nvol
() {
return
m_fopr_w
->
field_nvol
(); }
192
int
field_nin
() {
return
m_fopr_w
->
field_nin
(); }
193
int
field_nex
() {
return
m_fopr_w
->
field_nex
(); }
194
};
195
#endif
src
Fopr
fopr_TMWilson.h
Generated on Tue Jul 23 2013 10:48:48 for Bridge++ by
1.8.3.1