-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The Schwinger model code for two degenerate flavors has two classes: GaugeConf and HMC, which contain the relevant functions/properties of the gauge configurations and the Hybrid Monte Carlo algorithm. Some other modules are added to perform the matrix operations, statistical analysis, global variables and operator overloading. All the
std:vector<std::vector<std::complex<double>>> Psi[Nx*Nt][2]
The first entry corresponds to the volume coordinate and the second one to the spin. Essentially it is just a rearrangment of the vector
We briefly describe the content of the .h files in the include directory
variables.h
- Declares the lattice dimensions (the values for
$N_x$ and$N_t$ are extracted from theCMakeLists.txtfile) - Declares a 2d vector which contains the vectorized version of the 2d coordinates: Coords[x][t] =
$x\cdot N_t + t$ . Coords is defined with thevoid Coordinates()function located ingauge_conf.h - x_1_t1 is a 2d array that has the vectorized coordinates of the neighbors
$(t-1,x+1)$ (with periodic boundary). - x1_t_1 is a 2d array that has the vectorized coordinates of the neighbors
$(t+1,x-1)$ (with periodic boundary). Both arrays are initialized inmatrix_operations.h, in the functionperiodic_boundary(). - RightPB stores the neighbor coordinates Coords[x, t + 1], Coords[x + 1,t].
- LeftPB stores the neighbor coordinates Coords[x - 1,t], Coords[x, t + 1]. Again, the arrays are initialized in the function
periodic_boundary().
statistics.h
- Has some functions to obtain the mean of a set of measurements and the jackknife error.
- Overloads the operators *,+,- for matrix-vector multiplication, scalar-matrix multiplication, matrix addition and substraction, vector addition and substraction and scalar-vector multiplication.
- Defines the alias
typedef std::complex<double> c_double;
typedef std::vector<c_double> c_vector;
typedef std::vector<c_vector> c_matrix;
- Defines a complex dot product between complex fields arranged as psi[Nx*Nt][2]
- Defines a complex dot product between complex vectors arranged as psi[no_of_entries]
class GaugeConf
- Intializes and stores the gauge configuration.
- Computes and stores the plaquettes.
- Computes and stores the staples.
- Measures the average plaquette value.
hmc.h
class HMC
- Intializes random momenta.
- Computes the force for the gauge term.
- Computes the force for the fermionic term.
- Performs the leapfrog algorithm.
- Computes the action (needed for the accept/reject step).
- Accept/reject step.
- Updates the configuration with leapfrog and the accept/reject step.
matrix_operations.h
- Defines the
$\sigma$ matrices. - Implements the periodic boundary and anti-periodic boundary conditions.
- Implements the operations
$D\phi$ ,$D^\dagger \phi$ ,$DD^\dagger \phi$ and$\psi^\dagger \frac{\partial D}{\partial \omega_\mu (z)}\chi$ , for arbitrary fields. These operations don't assemble the Dirac matrix.
conjugate_gradient.h
- Conjugate gradient to invert
$(DD^\dagger)^{-1} \phi$ for arbitrary$\phi$ .
config.h and config.h.in are just files needed for cmake.