| su2hmc
    | 
Function declarations for most of the routines. More...
#include <errorcodes.h>#include <integrate.h>#include <sizes.h>#include <stdio.h>#include <stdlib.h>#include <time.h>Go to the source code of this file.
| Functions | |
| int | Force (double *dSdpi, int iflag, double res1, Complex *X0, Complex *X1, Complex *Phi, Complex *ut[2], Complex_f *ut_f[2], unsigned int *iu, unsigned int *id, Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk[2], float *dk_f[2], Complex_f jqq, float akappa, float beta, double *ancg) | 
| Calculates the force \(\frac{dS}{d\pi}\) at each intermediate time. | |
| int | Gauge_force (double *dSdpi, Complex_f *ut[2], unsigned int *iu, unsigned int *id, float beta) | 
| Calculates the gauge force due to the Wilson Action at each intermediate time. | |
| int | Init (int istart, int ibound, int iread, float beta, float fmu, float akappa, Complex_f ajq, Complex *u[2], Complex *ut[2], Complex_f *ut_f[2], Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk[2], float *dk_f[2], unsigned int *iu, unsigned int *id) | 
| Initialises the system. | |
| int | Hamilton (double *h, double *s, double res2, double *pp, Complex *X0, Complex *X1, Complex *Phi, Complex_f *ut[2], unsigned int *iu, unsigned int *id, Complex_f *gamval_f, int *gamin, float *dk[2], Complex_f jqq, float akappa, float beta, double *ancgh, int traj) | 
| Calculate the Hamiltonian. | |
| int | Congradq (int na, double res, Complex *X1, Complex *r, Complex_f *ut[2], unsigned int *iu, unsigned int *id, Complex_f *gamval_f, int *gamin, float *dk[2], Complex_f jqq, float akappa, int *itercg) | 
| Matrix Inversion via Conjugate Gradient (up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) Implements up/down partitioning The matrix multiplication step is done at single precision, while the update is done at double. | |
| int | Congradp (int na, double res, Complex *Phi, Complex *xi, Complex_f *ut[2], unsigned int *iu, unsigned int *id, Complex_f *gamval, int *gamin, float *dk[2], Complex_f jqq, float akappa, int *itercg) | 
| Matrix Inversion via Conjugate Gradient (no up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) The matrix multiplication step is done at single precision, while the update is done at double. | |
| int | Measure (double *pbp, double *endenf, double *denf, Complex *qq, Complex *qbqb, double res, int *itercg, Complex *ut[2], Complex_f *ut_f[2], unsigned int *iu, unsigned int *id, Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk[2], float *dk_f[2], Complex_f jqq, float akappa, Complex *Phi, Complex *R1) | 
| Calculate fermion expectation values via a noisy estimator. | |
| int | Average_Plaquette (double *hg, double *avplaqs, double *avplaqt, Complex_f *ut[2], unsigned int *iu, float beta) | 
| Calculates the gauge action using new (how new?) lookup table. | |
| int | SU2plaq (Complex_f *ut[2], Complex_f Sigma[2], unsigned int *iu, int i, int mu, int nu) | 
| Calculates the plaquette at site i in the \(\mu--\nu\) direction. | |
| double | Polyakov (Complex_f *ut[2]) | 
| Calculate the Polyakov loop (no prizes for guessing that one...) | |
| int | C_gather (Complex_f *x, Complex_f *y, int n, unsigned int *table, unsigned int mu) | 
| Extracts all the single precision gauge links in the \(\mu\) direction only. | |
| int | Z_gather (Complex *x, Complex *y, int n, unsigned int *table, unsigned int mu) | 
| Extracts all the double precision gauge links in the \(\mu\) direction only. | |
| int | Fill_Small_Phi (int na, Complex *smallPhi, Complex *Phi) | 
| int | UpDownPart (const int na, Complex *X0, Complex *R1) | 
| int | Reunitarise (Complex *ut[2]) | 
| Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1. | |
Function declarations for most of the routines.
Definition in file su2hmc.h.
| int Average_Plaquette | ( | double * | hg, | 
| double * | avplaqs, | ||
| double * | avplaqt, | ||
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| float | beta ) | 
Calculates the gauge action using new (how new?) lookup table.
Follows a routine called qedplaq in some QED3 code
| hg | Gauge component of Hamilton | 
| avplaqs | Average spacial Plaquette | 
| avplaqt | Average Temporal Plaquette | 
| ut | The trial fields | 
| iu | Upper halo indices | 
| beta | Inverse gauge coupling | 
Definition at line 20 of file bosonic.c.
References Complex_f, gvol, kvol, ndim, Par_dsum(), rank, and SU2plaq().
Extracts all the single precision gauge links in the \(\mu\) direction only.
| x | The output | 
| y | The gauge field for a particular colour | 
| n | Number of sites in the gauge field. This is typically kvol | 
| table | Table containing information on nearest neighbours. Usually id or iu | 
| mu | Direciton we're interested in extractng | 
Definition at line 357 of file su2hmc.c.
References Complex_f, and ndim.
| int Congradp | ( | int | na, | 
| double | res, | ||
| Complex * | Phi, | ||
| Complex * | xi, | ||
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| Complex_f * | gamval, | ||
| int * | gamin, | ||
| float * | dk[2], | ||
| Complex_f | jqq, | ||
| float | akappa, | ||
| int * | itercg ) | 
Matrix Inversion via Conjugate Gradient (no up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) The matrix multiplication step is done at single precision, while the update is done at double.
| na | Flavour index | 
| res | Limit for conjugate gradient | 
| Phi | Pseudofermion field. | 
| xi | Returned as \((M^\dagger M)^{-1} \Phi\) | 
| u11t | First colour's trial field | 
| u12t | Second colour's trial field | 
| iu | Upper halo indices | 
| id | Lower halo indices | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
| gamin | Dirac indices | 
| dk4m | \(\left(1+\gamma_0\right)e^{-\mu}\) | 
| dk4p | \(\left(1-\gamma_0\right)e^\mu\) | 
| jqq | Diquark source | 
| akappa | Hopping Parameter | 
| itercg | Counts the iterations of the conjugate gradient | 
Definition at line 250 of file congrad.c.
References AVX, Complex, Complex_f, Dslash_f(), Dslashd_f(), kferm, kfermHalo, kvol, nc, ngorkov, niterc, Par_dsum(), Par_fsum(), and rank.
| int Congradq | ( | int | na, | 
| double | res, | ||
| Complex * | X1, | ||
| Complex * | r, | ||
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| Complex_f * | gamval_f, | ||
| int * | gamin, | ||
| float * | dk[2], | ||
| Complex_f | jqq, | ||
| float | akappa, | ||
| int * | itercg ) | 
Matrix Inversion via Conjugate Gradient (up/down flavour partitioning). Solves \((M^\dagger)Mx=\Phi\) Implements up/down partitioning The matrix multiplication step is done at single precision, while the update is done at double.
| na | Flavour index | 
| res | Limit for conjugate gradient | 
| X1 | Pseudofermion field \(\Phi\) initially, returned as \((M^\dagger M)^{-1} \Phi\) | 
| r | Partition of \(\Phi\) being used. Gets recycled as the residual vector | 
| ut | Trial colour fields | 
| iu | Upper halo indices | 
| id | Lower halo indices | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
| gamin | Dirac indices | 
| dk | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)e^\mu\) | 
| jqq | Diquark source | 
| akappa | Hopping Parameter | 
| itercg | Counts the iterations of the conjugate gradient | 
Definition at line 7 of file congrad.c.
References AVX, Complex, Complex_f, Hdslash_f(), Hdslashd_f(), kferm2, kferm2Halo, niterc, Par_dsum(), Par_fsum(), and rank.
Copies necessary (2*4*kvol) elements of Phi into a vector variable
| na | flavour index | 
| smallPhi | The partitioned output | 
| Phi | The pseudofermion field | 
Definition at line 385 of file su2hmc.c.
References Complex, kvol, nc, ndirac, and ngorkov.
| int Force | ( | double * | dSdpi, | 
| int | iflag, | ||
| double | res1, | ||
| Complex * | X0, | ||
| Complex * | X1, | ||
| Complex * | Phi, | ||
| Complex * | ut[2], | ||
| Complex_f * | ut_f[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| Complex * | gamval, | ||
| Complex_f * | gamval_f, | ||
| int * | gamin, | ||
| double * | dk[2], | ||
| float * | dk_f[2], | ||
| Complex_f | jqq, | ||
| float | akappa, | ||
| float | beta, | ||
| double * | ancg ) | 
Calculates the force \(\frac{dS}{d\pi}\) at each intermediate time.
| dSdpi | The force | 
| iflag | Invert before evaluating the force. 0 to invert, one not to. Blame FORTRAN... | 
| res1 | Conjugate gradient residule | 
| X0 | Up/down partitioned pseudofermion field | 
| X1 | Holder for the partitioned fermion field, then the conjugate gradient output | 
| Phi | Pseudofermion field | 
| ut | Double precision colour fields | 
| u2t_f | Single precision colour fields | 
| iu,id | Lattice indices | 
| gamin | Gamma indices | 
| gamval | Double precision gamma matrices rescaled by kappa | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
| dk | \(e^{-\mu}\) and \(e^\mu\) | 
| dk_f | \(e^{-\mu}\) and \(e^\mu\) float | 
| jqq | Diquark source | 
| akappa | Hopping parameter | 
| beta | Inverse gauge coupling | 
| ancg | Counter for conjugate gradient iterations | 
Definition at line 94 of file force.c.
References AVX, Complex, Complex_f, Congradq(), DOWN, Fill_Small_Phi(), Gauge_force(), Hdslash(), Hdslash_f(), kferm2, kferm2Halo, kvol, nadj, nc, ndim, ndirac, nf, and ZHalo_swap_dir().
| int Gauge_force | ( | double * | dSdpi, | 
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| float | beta ) | 
Calculates the gauge force due to the Wilson Action at each intermediate time.
| dSdpi | The force | 
| ut | Gauge fields | 
| iu,id | Lattice indices | 
| beta | Inverse gauge coupling | 
Definition at line 6 of file force.c.
References AVX, C_gather(), CHalo_swap_dir(), Complex_f, DOWN, halo, kvol, nadj, and ndim.
| int Hamilton | ( | double * | h, | 
| double * | s, | ||
| double | res2, | ||
| double * | pp, | ||
| Complex * | X0, | ||
| Complex * | X1, | ||
| Complex * | Phi, | ||
| Complex_f * | ut[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| Complex_f * | gamval_f, | ||
| int * | gamin, | ||
| float * | dk[2], | ||
| Complex_f | jqq, | ||
| float | akappa, | ||
| float | beta, | ||
| double * | ancgh, | ||
| int | traj ) | 
Calculate the Hamiltonian.
| h | Hamiltonian | 
| s | Action | 
| res2 | Limit for conjugate gradient | 
| pp | Momentum field | 
| X0 | Up/down partitioned pseudofermion field | 
| X1 | Holder for the partitioned fermion field, then the conjugate gradient output | 
| Phi | Pseudofermion field | 
| ut | Gauge fields (single precision) | 
| iu,id | Lattice indices | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
| gamin | Gamma indices | 
| dk_f | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)e^\mu\) float | 
| jqq | Diquark source | 
| akappa | Hopping parameter | 
| beta | Inverse gauge coupling | 
| ancgh | Conjugate gradient iterations counter | 
| traj | Calling trajectory for error reporting | 
Definition at line 245 of file su2hmc.c.
References Average_Plaquette(), AVX, Complex, Complex_f, Congradq(), Fill_Small_Phi(), kferm2, kmom, nf, Par_dsum(), and rank.
| int Init | ( | int | istart, | 
| int | ibound, | ||
| int | iread, | ||
| float | beta, | ||
| float | fmu, | ||
| float | akappa, | ||
| Complex_f | ajq, | ||
| Complex * | u[2], | ||
| Complex * | ut[2], | ||
| Complex_f * | ut_f[2], | ||
| Complex * | gamval, | ||
| Complex_f * | gamval_f, | ||
| int * | gamin, | ||
| double * | dk[2], | ||
| float * | dk_f[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id ) | 
Initialises the system.
| istart | Zero for cold, >1 for hot, <1 for none | 
| ibound | Periodic boundary conditions | 
| iread | Read configuration from file | 
| beta | Inverse gauge coupling | 
| fmu | Chemical potential | 
| akappa | Hopping parameter | 
| ajq | Diquark source | 
| u | Gauge fields | 
| ut | Trial gauge field | 
| ut_f | Trial gauge field (single precision) | 
| dk | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)^\mu\) | 
| dk_f | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)^\mu\) float | 
| iu,id | Up halo indices | 
| gamin | Gamma matrix indices | 
| gamval | Double precision gamma matrices rescaled by kappa | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
Definition at line 19 of file su2hmc.c.
References Addrc(), AVX, Check_addr(), Complex, Complex_f, DHalo_swap_dir(), halo, ksize, ksizet, kvol, kvol3, ndim, npt, nthreads, Par_ranset(), Par_sread(), pcoord, ran2(), rank, Reunitarise(), seed, and UP.
| int Measure | ( | double * | pbp, | 
| double * | endenf, | ||
| double * | denf, | ||
| Complex * | qq, | ||
| Complex * | qbqb, | ||
| double | res, | ||
| int * | itercg, | ||
| Complex * | ut[2], | ||
| Complex_f * | ut_f[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id, | ||
| Complex * | gamval, | ||
| Complex_f * | gamval_f, | ||
| int * | gamin, | ||
| double * | dk[2], | ||
| float * | dk_f[2], | ||
| Complex_f | jqq, | ||
| float | akappa, | ||
| Complex * | Phi, | ||
| Complex * | R1 ) | 
Calculate fermion expectation values via a noisy estimator.
Matrix inversion via conjugate gradient algorithm Solves \(MX=X_1\) (Numerical Recipes section 2.10 pp.70-73) 
 uses NEW lookup tables ** Implemented in Congradp()
| pbp | \(\langle\bar{\Psi}\Psi\rangle\) | 
| endenf | Energy density | 
| denf | Number Density | 
| Diquark condensate | |
| qbqb | Antidiquark condensate | 
| res | Conjugate Gradient Residue | 
| itercg | Iterations of Conjugate Gradient | 
| ut | Double precisiongauge field | 
| ut_f | Single precision gauge fields | 
| iu,id | Lattice indices | 
| gamval | Double precision gamma matrices rescaled by kappa | 
| gamval_f | Single precision gamma matrices rescaled by kappa | 
| gamin | Indices for Dirac terms | 
| dk | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)e^\mu\) double | 
| dk_f | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)e^\mu\) float | 
| jqq | Diquark source | 
| akappa | Hopping parameter | 
| Phi | Pseudofermion field | 
| R1 | A useful array for holding things that was already assigned in main. In particular, we'll be using it to catch the output of \( M^\dagger\Xi\) before the inversion, then used to store the output of the inversion | 
Definition at line 8 of file fermionic.c.
References AVX, Complex, Complex_f, Congradp(), DOWN, Dslashd_f(), Gauss_c(), gvol, kferm, kfermHalo, kvol, nc, ndim, ndirac, ngorkov, Par_dsum(), UP, and ZHalo_swap_dir().
| double Polyakov | ( | Complex_f * | ut[2] | ) | 
Calculate the Polyakov loop (no prizes for guessing that one...)
| u11t,u12t | The gauge fields | 
Calculate the Polyakov loop (no prizes for guessing that one...)
| ut[0],ut[1] | The trial fields | 
Par_tmul(), Par_dsum()
Definition at line 127 of file bosonic.c.
References AVX, Complex_f, gvol3, ksizet, kvol3, ndim, Par_dsum(), pcoord, and rank.
| 
 | inline | 
Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1.
If you're looking at the FORTRAN code be careful. There are two header files for the /trial/ header. One with u11 u12 (which was included here originally) and the other with u11t and u12t.
| ut | Trial fields to be reunitarised | 
Definition at line 1012 of file matrices.c.
References Complex, kvol, and ndim.
| 
 | inline | 
Calculates the plaquette at site i in the \(\mu--\nu\) direction.
| u2t | Trial fields | 
| Sigma | Plaquette components | 
| i | Lattice site | 
| iu | Upper halo indices | 
| mu,nu | Plaquette direction. Note that mu and nu can be negative to facilitate calculating plaquettes for Clover terms. No sanity checks are conducted on them in this routine. | 
Calculates the trace of the plaquette at site i in the μ-ν direction
| ut[0],ut[1] | Trial fields | 
| Sigma11,Sigma12 | Trial fields | 
| *iu | Upper halo indices | 
| i | site index | 
| mu,nu | Plaquette direction. Note that mu and nu can be negative to facilitate calculating plaquettes for Clover terms. No sanity checks are conducted on them in this routine. | 
double corresponding to the plaquette value
Definition at line 85 of file bosonic.c.
References Complex_f, and ndim.
Definition at line 416 of file su2hmc.c.
Extracts all the double precision gauge links in the \(\mu\) direction only.
| x | The output | 
| y | The gauge field for a particular colour | 
| n | Number of sites in the gauge field. This is typically kvol | 
| table | Table containing information on nearest neighbours. Usually id or iu | 
| mu | Direciton we're interested in extractng | 
Definition at line 371 of file su2hmc.c.