Branch: develop Files: Grid/lattice/PaddedCell.h -- Halo exchange tests/Test_general_stencil.cc -- test local off axis stencil addressing tests/debug/Test_padded_cell.cc -- test PaddedCell halo exchange and the General local stencil by computing ALL plaquettes on lattice Functionality: -- extend a lattice field: Grid/lattice/PaddedCell.h // Constructor PaddedCell(int _depth,GridCartesian *_grid) // Expand a field "in" to depth "d" template inline Lattice Exchange(Lattice &in) // Take the "apple core" of in to a smaller local volume template inline Lattice Extract(Lattice &in) -- Plaquette test: tests/debug/Test_padded_cell.cc ///////////////////////////////////////////////// // Create a padded cell of extra padding depth=1 ///////////////////////////////////////////////// int depth = 1; PaddedCell Ghost(depth,&GRID); LatticeGaugeField Ughost = Ghost.Exchange(Umu); ///// Array for the site plaquette GridBase *GhostGrid = Ughost.Grid(); LatticeComplex gplaq(GhostGrid); std::vector shifts; for(int mu=0;mu_offset; int o1 = SE1->_offset; int o2 = SE2->_offset; int o3 = SE3->_offset; auto U0 = U_v[o0](mu); auto U1 = U_v[o1](nu); auto U2 = adj(U_v[o2](mu)); auto U3 = adj(U_v[o3](nu)); gpermute(U0,SE0->_permute); gpermute(U1,SE1->_permute); gpermute(U2,SE2->_permute); gpermute(U3,SE3->_permute); gp_v[ss]() =gp_v[ss]() + trace( U0*U1*U2*U3 ); s=s+4; } } } } cplaq = Ghost.Extract(gplaq);