From 876c8f4478886479bcd1e505e5481bf34afb8958 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 11 May 2023 12:35:49 -0400 Subject: [PATCH] Nodes on padded cell --- documentation/David_notes.txt | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 documentation/David_notes.txt diff --git a/documentation/David_notes.txt b/documentation/David_notes.txt new file mode 100644 index 00000000..b077a315 --- /dev/null +++ b/documentation/David_notes.txt @@ -0,0 +1,90 @@ +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);