Lattice constructor and initial conditions

The lattice constructor

Lattice latticename(size);


creates a lattice of length ``size'' and sets the values of all sites to zero. One can then generate random initial conditions by calling

latticename.PreciseSeed(p);


where $p \in [0,1]$ is the desired density of ones (number of ones divided by lattice size). Note that this function generates random initial condition with exactly $\mathtt{round}(pN)$ ones, where $N$ is the lattice size.

You can also generate you own initial condition by directly setting individual lattice bits. This can be done with $[\cdot ]$ operator. For example, in order to set first 50 sites to 1, and the rest to 0, we can type

Lattice lat(100);
int i;
for(i=0; i<50; i++) lat[i]=1;


H.F.