HILA
Loading...
Searching...
No Matches
lattice.block

block the lattice by factor, switching to smaller lattice.

block the lattice by factor, switching to smaller lattice. lattice.size() must be element-by-element divisible by factor

({2,2,2}) reduces current lattice size by 2 to each direction.

Note
Previously used Field variables cannot be used in onsites(). However, their content can be blocked to new Field with Field<T>::block_from(), which copies the content from the blocked (sparse) set of sites;
a[ALL] = X.x() + X.y() + X.z(); // in 3d
CoordinateVector factor{2,2,2};
lattice.block(factor);
b.block_from(a); // Now b contains 0+0+0, 2+0+0 ...
b[ALL] = -b[X]; // Do operations, here flip sign
// onsites(ALL) a[X] = 1; // ERROR, a belongs to original lattice
b.unblock_to(a); // copy content of b back to a on blocked sites,
// leaving other sites of a
lattice.unblock(); // return to original lattice
// Now a can be used, it contains -(0+0+0), 1+0+0, -(2+0+0), ...
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
Definition field.h:62
void unblock_to(Field< T > &target) const
Copy content to the argument Field on blocked (sparse) sites. a.unblock_to(b) is the inverse of a....
Definition field_comm.h:971
Lattice unblock()
Unblock lattice, returning to parent. Current lattice must be a blocked lattice.
Definition lattice.h:589
constexpr Parity ALL
bit pattern: 011
Note
Fields which were not used previously can be used in blocked levels, or their association (and content) can be deleted with .clear():
a = 1;
lattice.block({2,2,1});
b = 2; // OK, b was not used before blocking
a = 3; // ERROR; a belongs to non-blocked lattice
a.clear();
a = 3; // OK, now a belongs to blocked lattice
void clear()
Destroys field data.
Definition field.h:406
Returns
lattice_struct * to blocked lattice