Dirac operator

The module Dirac has the necessary stuctures and function to simulate non-dynamical 4-dimensional Wilson fermions.

There are two main data structures in this module, the structure DiracParam

LatticeGPU.Dirac.DiracParamType
struct DiracParam{T,R}

Stores the parameters of the Dirac operator. It can be generated via the constructor function DiracParam{T}(::Type{R},m0,csw,th,tm,ct). The first argument can be ommited and is taken to be SU3fund. The parameters are:

  • m0::T : Mass of the fermion
  • csw::T : Improvement coefficient for the Csw term
  • th{Ntuple{4,Complex{T}}} : Phase for the fermions included in the boundary conditions, reabsorbed in the Dirac operator.
  • tm : Twisted mass parameter
  • ct : Boundary improvement term, only used for Schrödinger Funtional boundary conditions.
source

and the workspace DiracWorkspace

LatticeGPU.Dirac.DiracWorkspaceType
struct DiracWorkspace{T}

Workspace needed to work with fermion fields. It contains four scalar fermion fields and, for the SU2fund and SU3fund, a U(N) field to store the clover term.

It can be created with the constructor DiracWorkspace(::Type{G}, ::Type{T}, lp::SpaceParm{4,6,B,D}). For example:

dws = DiracWorkspace(SU2fund,Float64,lp); dws = DiracWorkspace(SU3fund,Float64,lp);

source

The workspace stores four fermion fields, namely .sr, .sp, .sAp and .st, used for different purposes. If the representation is either SU2fund of SU3fund, an extra field with values in U2alg/U3alg is created to store the clover, used for the improvent.

Functions

The functions Dw!, g5Dw! and DwdagDw! are all related to the Wilson-Dirac operator.

The action of the Dirac operator Dw! is the following:

\[D_w\psi (\vec{x} = x_1,x_2,x_3,x_4) = (4 + m_0 + i \mu \gamma_5)\psi(\vec{x}) - \]

\[ - \frac{1}{2}\sum_{\mu = 1}^4 \theta (\mu) (1-\gamma_\mu) U_\mu(\vec{x}) \psi(\vec{x} + \hat{\mu}) + \theta^* (\mu) (1 + \gamma_\mu) U^{-1}_\mu(\vec{x} - \hat{\mu}) \psi(\vec{x} - \hat{\mu})\]

where $m_0$ and $\theta$ are respectively the values .m0 and .th of DiracParam. Note that $|\theta(\mu)|=1$ is not built into the code, so it should be imposed explicitly.

Additionally, if |dpar.csw| > 1.0E-10, the clover term is assumed to be stored in ymws.csw, which can be done via the Csw! function. In this case we have the Sheikholeslami–Wohlert (SW) term in Dw!:

\[ \delta D_w^{sw} = \frac{i}{2}c_{sw} \sum_{\pi = 1}^6 F^{cl}_\pi \sigma_\pi \psi(\vec{x})\]

where the $\sigma$ matrices are those described in the Spinors module and the index $\pi$ runs as specified in lp.plidx.

If the boudary conditions, defined in lp, are either BC_SF_ORBI,D or BC_SF_AFWB, the improvement term

\[ \delta D_w^{SF} = (c_t -1) (\delta_{x_4,a} \psi(\vec{x}) + \delta_{x_4,T-a} \psi(\vec{x}))\]

is added. Since the time-slice $t=T$ is not stored, this accounts to modifying the second and last time-slice.

Note that the Dirac operator for SF boundary conditions assumes that the value of the field in the first time-slice is zero. To enforce this, we have the function

LatticeGPU.Dirac.SF_bndfix!Function
SF_bndfix!(sp, lp::Union{SpaceParm{4,6,BC_SF_ORBI,D},SpaceParm{4,6,BC_SF_AFWB,D}})

Sets all the values of sp in the first time slice to zero.

source

Note that this is not enforced in the Dirac operators, so if the field so does not satisfy SF boundary conditions, it will not (in general) satisfy them after applying Dw! or g5Dw!. This function is called for the function DwdagDw!, so in this case so will always be a proper SF field after calling this function.

The function Csw! is used to store the clover in dws.csw. It is computed according to the expression

\[F_{\mu,\nu} = \frac{1}{8} (Q_{\mu \nu} - Q_{\nu \mu})\]

where

\[Q_{\mu\nu} = U_\mu(\vec{x})U_{\nu}(x+\mu)U_{\mu}^{-1}(\vec{x}+\nu)U_{\nu}(\vec{x}) + U_{\nu}^{-1}(\vec{x}-\nu) U_\mu (\vec{x}-\nu) U_{\nu}(\vec{x} +\mu - \nu) U^{-1}_{\mu}(\vec{x}) +\]

\[+ U^{-1}_{\mu}(x-\mu)U_\nu^{-1}(\vec{x} - \mu - \nu)U_\mu(\vec{x} - \mu - \nu)U_\nu^{-1}(x-\nu) +\]

\[+U_{\nu}(\vec{x})U_{\mu}^{-1}(\vec{x} + \nu - \mu)U^{-1}_{\nu}(\vec{x} - \mu)U_\mu(\vec{x}-\mu) \]

The correspondence between the tensor field and the GPU-Array is the following:

\[F[b,1,r] \to F_{41}(b,r) ,\quad F[b,2,r] \to F_{42}(b,r) ,\quad F[b,3,r] \to F_{43}(b,r) \]

\[F[b,4,r] \to F_{31}(b,r) ,\quad F[b,5,r] \to F_{32}(b,r) ,\quad F[b,6,r] \to F_{21}(b,r) \]

where $(b,r)$ labels the lattice points as explained in the module Space

The function pfrandomize!, userfull for stochastic sources, is also present. It randomizes a fermion field either in all the space or in a specifit time-slice.

The generic interface of these functions reads

LatticeGPU.Dirac.Dw!Function
function Dw!(so, U, si, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm{4,6,B,D})

Computes the Dirac operator (with the Wilson term) $D_w$ with gauge field U and parameters dpar of the field si and stores it in so. If dpar.csw is different from zero, the clover term should be stored in dws.csw via the Csw! function and is automatically included in the operator.

source
LatticeGPU.Dirac.g5Dw!Function
function g5Dw!(so, U, si, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm{4,6,B,D})

Computes $\gamma_5$ times the Dirac operator (with the Wilson term) with gauge field U and parameters dpar of the field si and stores it in so. If dpar.csw is different from zero, the clover term should be stored in dws.csw via the Csw! function and is automatically included in the operator.

source
LatticeGPU.Dirac.DwdagDw!Function
function DwdagDw!(so, U, si, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm{4,6,B,D})

Applies the operator $\gamma_5 D_w$ twice to si and stores the result in so. This is equivalent to appling the operator $D_w^\dagger D_w$ The Dirac operator is the same as in the functions Dw! and g5Dw!

source
LatticeGPU.Dirac.pfrandomize!Function
function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund / SU2fund {T}}}, lp::SpaceParm, t::Int64 = 0)

Randomizes the SU2fund / SU3fund fermion field. If the argument t is present, it only randomizes that time-slice.

source