mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
include missing staple orientations; invert path direction, which was backwards
This commit is contained in:
parent
d536c67b9d
commit
df99f227c1
@ -112,12 +112,13 @@ public:
|
||||
// This is where the 3-link constructs will be stored
|
||||
LGF Ughost_fat(Ughost.Grid());
|
||||
|
||||
// Create 3-link stencil (class will build its own stencils)
|
||||
// writing your own stencil, you're hard-coding the periodic BCs, so you don't need
|
||||
// the policy-based stuff, at least for now
|
||||
// Create 3-link stencil. Writing your own stencil, you're hard-coding the
|
||||
// periodic BCs, so you don't need the policy-based stuff, at least for now.
|
||||
// Loop over all orientations, i.e. demand mu != nu.
|
||||
std::vector<Coordinate> shifts;
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
for(int nu=mu+1;nu<Nd;nu++){
|
||||
for(int mu=0;mu<Nd;mu++)
|
||||
for(int nu=0;nu<Nd;nu++) {
|
||||
if(mu==nu) continue;
|
||||
// forward shifts
|
||||
Coordinate shift_0(Nd,0);
|
||||
Coordinate shift_mu(Nd,0); shift_mu[mu]=1;
|
||||
@ -134,7 +135,7 @@ public:
|
||||
shifts.push_back(shift_nu); // in principle you don't need both of these grid points,
|
||||
shifts.push_back(shift_nu); // but it helps the reader keep track of offsets
|
||||
}
|
||||
}
|
||||
|
||||
GeneralLocalStencil gStencil(GhostGrid,shifts);
|
||||
|
||||
Ughost_fat=Zero();
|
||||
@ -150,8 +151,9 @@ public:
|
||||
// plaquette orientations, and as we travel around a plaquette.
|
||||
int s=0;
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
for(int nu=mu+1;nu<Nd;nu++){
|
||||
for(int mu=0;mu<Nd;mu++)
|
||||
for(int nu=0;nu<Nd;nu++) {
|
||||
if(mu==nu) continue;
|
||||
|
||||
// shift_mu; shift_mu[mu]=1
|
||||
// shift_nu; shift_nu[nu]=1
|
||||
@ -174,30 +176,33 @@ public:
|
||||
int o4 = SE4->_offset;
|
||||
int o5 = SE5->_offset;
|
||||
|
||||
auto U0 = U_v[o0](nu);
|
||||
auto U1 = adj(U_v[o1](mu));
|
||||
auto U2 = adj(U_v[o2](nu));
|
||||
// When you're deciding whether to take an adjoint, the question is: how is the
|
||||
// stored link oriented compared to the one you want? If I imagine myself travelling
|
||||
// with the to-be-updated link, I have two possible, alternative 3-link paths I can
|
||||
// take, one starting by going to the left, the other starting by going to the right.
|
||||
auto U0 = adj(U_v[o0](nu));
|
||||
auto U1 = U_v[o1](mu);
|
||||
auto U2 = U_v[o2](nu);
|
||||
|
||||
gpermute(U0,SE0->_permute);
|
||||
gpermute(U1,SE1->_permute);
|
||||
gpermute(U2,SE2->_permute);
|
||||
|
||||
auto U3 = adj(U_v[o3](nu));
|
||||
auto U4 = adj(U_v[o4](mu));
|
||||
auto U5 = U_v[o5](nu);
|
||||
auto U3 = U_v[o3](nu);
|
||||
auto U4 = U_v[o4](mu);
|
||||
auto U5 = adj(U_v[o5](nu));
|
||||
|
||||
gpermute(U3,SE3->_permute);
|
||||
gpermute(U4,SE4->_permute);
|
||||
gpermute(U5,SE5->_permute);
|
||||
|
||||
// forward backward
|
||||
auto W = U0*U1*U2 + U3*U4*U5;
|
||||
// "left" "right"
|
||||
auto W = U2*U1*U0 + U5*U4*U3;
|
||||
U_fat_v[ss](mu) = U_fat_v[ss](mu) + W;
|
||||
|
||||
s=s+6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u_smr = lt.c_3*Ghost.Extract(Ughost_fat) + lt.c_1*u_thin;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user