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 *u11t, Complex *u12t, Complex_f *u11t_f, Complex_f *u12t_f, unsigned int *iu, unsigned int *id, Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk4m, double *dk4p, float *dk4m_f, float *dk4p_f, 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 *u11t, Complex_f *u12t, 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 *u11, Complex *u12, Complex *u11t, Complex *u12t, Complex_f *u11t_f, Complex_f *u12t_f, Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk4m, double *dk4p, float *dk4m_f, float *dk4p_f, 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 *u11t, Complex *u12t, Complex_f *u11t_f, Complex_f *u12t_f, unsigned int *iu, unsigned int *id, Complex_f *gamval_f, int *gamin, float *dk4m_f, float *dk4p_f, 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 *u11t_f, Complex_f *u12t_f, unsigned int *iu, unsigned int *id, Complex_f *gamval_f, int *gamin, float *dk4m_f, float *dk4p_f, 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 *u11t, Complex_f *u12t, unsigned int *iu, unsigned int *id, Complex_f *gamval, int *gamin, float *dk4m, float *dk4p, 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 *u11t, Complex *u12t, Complex_f *u11t_f, Complex_f *u12t_f, unsigned int *iu, unsigned int *id, Complex *gamval, Complex_f *gamval_f, int *gamin, double *dk4m, double *dk4p, float *dk4m_f, float *dk4p_f, 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 *u11t, Complex_f *u12t, unsigned int *iu, float beta) |
Calculates the gauge action using new (how new?) lookup table. | |
float | SU2plaq (Complex_f *u11t, Complex_f *u12t, unsigned int *iu, int i, int mu, int nu) |
Calculates the plaquette at site i in the \(\mu--\nu\) direction. | |
double | Polyakov (Complex_f *u11t, Complex_f *u12t) |
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 *u11t, Complex *u12t) |
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 * | u11t, | ||
Complex_f * | u12t, | ||
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 |
u11t,u12t | The trial fields |
iu | Upper halo indices |
beta | Inverse gauge coupling |
Definition at line 8 of file bosonic.c.
References AVX, 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 321 of file su2hmc.c.
References ndim.
int Congradp | ( | int | na, |
double | res, | ||
Complex * | Phi, | ||
Complex * | xi, | ||
Complex_f * | u11t, | ||
Complex_f * | u12t, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
Complex_f * | gamval, | ||
int * | gamin, | ||
float * | dk4m, | ||
float * | dk4p, | ||
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 262 of file congrad.c.
References AVX, Complex, Complex_f, Dslash_f(), Dslashd_f(), kferm, kfermHalo, kvol, nc, ndim, ngorkov, niterc, Par_dsum(), Par_fsum(), and rank.
int Congradq | ( | int | na, |
double | res, | ||
Complex * | X1, | ||
Complex * | r, | ||
Complex_f * | u11t_f, | ||
Complex_f * | u12t_f, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
Complex_f * | gamval_f, | ||
int * | gamin, | ||
float * | dk4m_f, | ||
float * | dk4p_f, | ||
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 |
u11t_f | First colour's trial field |
u12t_f | 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_f | \(\left(1+\gamma_0\right)e^{-\mu}\) |
dk4p_f | \(\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, kvol, nc, ndim, ndirac, 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 349 of file su2hmc.c.
References kvol, nc, ndirac, and ngorkov.
int Force | ( | double * | dSdpi, |
int | iflag, | ||
double | res1, | ||
Complex * | X0, | ||
Complex * | X1, | ||
Complex * | Phi, | ||
Complex * | u11t, | ||
Complex * | u12t, | ||
Complex_f * | u11t_f, | ||
Complex_f * | u12t_f, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
Complex * | gamval, | ||
Complex_f * | gamval_f, | ||
int * | gamin, | ||
double * | dk4m, | ||
double * | dk4p, | ||
float * | dk4m_f, | ||
float * | dk4p_f, | ||
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 |
u11t,u12t | Double precision colour fields |
u11t_f,u12t_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 |
dk4m | \(e^{-\mu}\) |
dk4p | \(e^\mu\) |
dk4m_f | \(e^{-\mu}\) float |
dk4p_f | \(e^\mu\) float |
jqq | Diquark source |
akappa | Hopping parameter |
beta | Inverse gauge coupling |
ancg | Counter for conjugate gradient iterations |
Definition at line 131 of file force.c.
References AVX, Complex, Complex_f, Congradq(), DOWN, Fill_Small_Phi(), Gauge_force(), Hdslash(), kferm2, kferm2Halo, kvol, nadj, nc, ndim, ndirac, nf, and ZHalo_swap_dir().
int Gauge_force | ( | double * | dSdpi, |
Complex_f * | u11t, | ||
Complex_f * | u12t, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
float | beta ) |
Calculates the gauge force due to the Wilson Action at each intermediate time.
dSdpi | The force |
u11t,u12t | 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 * | u11t, | ||
Complex * | u12t, | ||
Complex_f * | u11t_f, | ||
Complex_f * | u12t_f, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
Complex_f * | gamval_f, | ||
int * | gamin, | ||
float * | dk4m_f, | ||
float * | dk4p_f, | ||
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 |
u11t,u12t | Gauge fields |
u11t_f,u12t_f | Gauge fields (single precision) |
iu,id | Lattice indices |
gamval_f | Single precision gamma matrices rescaled by kappa |
gamin | Gamma indices |
dk4m_f | \(\left(1+\gamma_0\right)e^{-\mu}\) float |
dk4p_f | \(\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 208 of file su2hmc.c.
References Average_Plaquette(), AVX, Complex, 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 * | u11, | ||
Complex * | u12, | ||
Complex * | u11t, | ||
Complex * | u12t, | ||
Complex_f * | u11t_f, | ||
Complex_f * | u12t_f, | ||
Complex * | gamval, | ||
Complex_f * | gamval_f, | ||
int * | gamin, | ||
double * | dk4m, | ||
double * | dk4p, | ||
float * | dk4m_f, | ||
float * | dk4p_f, | ||
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 |
u11,u12 | Gauge fields |
u11t,u12t | Trial gauge field |
u11t_f,u12t_f | Trial gauge field (single precision) |
dk4m | \(\left(1+\gamma_0\right)e^{-\mu}\) |
dk4p | \(\left(1-\gamma_0\right)^\mu\) |
dk4m_f | \(\left(1+\gamma_0\right)e^{-\mu}\) float |
dk4p_f | \(\left(1-\gamma_0\right)e^\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 * | u11t, | ||
Complex * | u12t, | ||
Complex_f * | u11t_f, | ||
Complex_f * | u12t_f, | ||
unsigned int * | iu, | ||
unsigned int * | id, | ||
Complex * | gamval, | ||
Complex_f * | gamval_f, | ||
int * | gamin, | ||
double * | dk4m, | ||
double * | dk4p, | ||
float * | dk4m_f, | ||
float * | dk4p_f, | ||
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 |
u11t,u12t | Double precisiongauge field |
u11t_f,u12t_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 |
dk4m | \(\left(1+\gamma_0\right)e^{-\mu}\) |
dk4p | \(\left(1-\gamma_0\right)e^\mu\) |
dk4m_f | \(\left(1+\gamma_0\right)e^{-\mu}\) |
dk4p_f | \(\left(1-\gamma_0\right)e^\mu\) |
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().
Calculate the Polyakov loop (no prizes for guessing that one...)
u11t,u12t | The gauge fields |
Definition at line 105 of file bosonic.c.
References AVX, Complex_f, gvol3, ksizet, kvol3, ndim, Par_dsum(), pcoord, and rank.
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.
u11t,u12t | Trial fields to be reunitarised |
Definition at line 904 of file matrices.c.
|
inline |
Calculates the plaquette at site i in the \(\mu--\nu\) direction.
u11t,u12t | Trial fields |
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. |
Definition at line 72 of file bosonic.c.
References Complex_f, and ndim.
Definition at line 380 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 335 of file su2hmc.c.
References ndim.