next up previous
Next: Zero fills Up: Fills Previous: Coordinate function fills

Constant fills

Syntax LatticeType operator=(LatticeType& r, const Type& a)
Meaning $r = a$ for all sites
Type All non-lattice objects
Example Real a = 2.0;
  LatticeReal r = a;

Constant (or lattice global) fills are always defined for lattice scalar objects broadcasting to all lattice sites. These are broadcasts of a lattice scalar type to a conforming lattice type.

NOTE, one can not fill a LatticeColorVector with a Real.

Syntax LatticeType operator=(LatticeType& r, const Type& a)
Meaning $r = \mathop{\rm diag}(a,a,\ldots{})$ (constant $a$)
Type Complex, ColorMatrix, SpinMatrix
Example Real a = 2.0;
  LatticeColorMatrix r = a;

Only sets the diagonal part of a field to a constant a times the identity.

This fill can only be used on primitive types that are scalars or matrices. E.g., it can not be used for a vector field since there is no meaning of diagonal. NOTE, a zero cannot be distinguished from a constant like 1. To initialize to zero the zero argument must be used.


next up previous
Next: Zero fills Up: Fills Previous: Coordinate function fills
Robert Edwards 2011-12-24