FLUE_heatbath
SU(3) heatbath update using Cabibbo–Marinari SU(2) subgroups.
This module implements a lattice gauge heatbath update using three embedded SU(2) subgroup updates.
Algorithm:
- Compute staple
- Form W = U * staple
- Apply SU(2) updates in (1,2), (1,3), (2,3)
- Reunitarize
Update strategy:
- Loop over direction mu
- Loop over colour classes
- Parallelise with do concurrent
Supported actions:
- Wilson (2 colours)
- Symanzik (4 colours)
- Iwasaki (4 colours)
Source: src/gauge/heatbath.f90
Dependencies
Contents
- apply_su2_subgroup_update
- build_colour_sites
- updateLinks
- stapleWilson
- stapleRectangle
- stapleSymanzik
- stapleIwasaki
- su3_updated_link
Subroutines
apply_su2_subgroup_update
Apply one embedded SU(2) heatbath update inside SU(3).
Inputs: ULink : current SU(3) link being updated W : current product U * staple, updated in tandem with ULink i1, i2 : the two SU(3) row/column indices defining the subgroup subgroup_id : 1, 2, or 3, used for the Philox substream beta, key : heatbath parameters and Philox key counter0 : counter with site id in counter(1)
Method:
- Extract the 2x2 block from W.
- Project it to the SU(2) quaternion representation.
- Build the SU(2) heatbath matrix.
- Embed the result back into SU(3).
- Left-multiply both ULink and W by the embedded matrix.
Attributes: pure
subroutine apply_su2_subgroup_update(ULink, W, i1, i2, subgroup_id, beta, key, counter0)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ULink | complex(kind=WC) | inout | dimension(3, 3) | Input link, output link |
W | complex(kind=WC) | inout | dimension(3, 3) | Input link, output link |
i1 | integer | in | Select which 2x2 block | |
i2 | integer | in | Select which 2x2 block | |
subgroup_id | integer | in | Philox variable | |
beta | real(kind=WP) | in | beta variables | |
key | integer(kind=C64) | in | dimension(2) | Philox key |
counter0 | integer(kind=C64) | in | dimension(4) | Philox keys |
Call graph
build_colour_sites
Construct checkerboard / multi-colour site lists The output layout is structure-of-arrays (SoA) for optimal memory access in do concurrent loops. Separates sites out into checkerboard Separate arrays for each of t, x, y, z
subroutine build_colour_sites(nt, nx, ny, nz, use_symanzik, sites_it, sites_ix, sites_iy, sites_iz, counts)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
nt | integer | in | Lattice dimensions | |
nx | integer | in | Lattice dimensions | |
ny | integer | in | Lattice dimensions | |
nz | integer | in | Lattice dimensions | |
use_symanzik | logical | in | Selects checkerboard scheme | |
sites_it | integer | out | allocatable, dimension(:, :, 😃 | T: Output coordinate arrays (SoA layout) |
sites_ix | integer | out | allocatable, dimension(:, :, 😃 | X: Output coordinate arrays (SoA layout) |
sites_iy | integer | out | allocatable, dimension(:, :, 😃 | Y: Output coordinate arrays (SoA layout) |
sites_iz | integer | out | allocatable, dimension(:, :, 😃 | Z: Output coordinate arrays (SoA layout) |
counts | integer | out | allocatable, dimension(:, 😃 | Number of sites per colour/checkerboard and direction |
Call graph
updateLinks
Perform one full heatbath sweep of the lattice
subroutine updateLinks(U, beta, UUpdated, master_key, sweep_id, sites_it, sites_ix, sites_iy, sites_iz, counts, actionTag, xi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
beta | real(kind=WP) | in | The beta value | |
UUpdated | complex(kind=WC) | inout | dimension(:,:,:,:,:,:😅 | Updated gaugefield [3,3,4,nt,nx,ny,nz] |
master_key | integer(kind=C64) | in | dimension(2) | Master key for philox |
sweep_id | integer | in | which sweep/trajectory it is. Used for Philox | |
sites_it | integer | in | dimension(:,:😅 | T: Output coordinates array in Structure of Arrays for better memomry access |
sites_ix | integer | in | dimension(:,:😅 | X: Output coordinates array in Structure of Arrays for better memomry access |
sites_iy | integer | in | dimension(:,:😅 | Y: Output coordinates array in Structure of Arrays for better memomry access |
sites_iz | integer | in | dimension(:,:😅 | Z: Output coordinates array in Structure of Arrays for better memomry access |
counts | integer | in | dimension(:😅 | Number of sites per colour and direction |
actionTag | character(len=*) | in | optional | Specifies the action |
xi | real(kind=WP) | in | optional | gauge anisotropy |
Call graph
stapleWilson
Compute the Wilson staple for one site
V = sum_{nu != mu} [ path(nu,-mu,-nu) + path(-nu,-mu,nu) ] with the starting coordinate shifted to x + mu.
Attributes: pure
subroutine stapleWilson(U, V, coord, mu, xi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
V | complex(kind=WC) | out | dimension(3, 3) | Output Wilson staple at this coordinate |
coord | integer | in | dimension(4) | Coordinate of the staple [it,ix,iy,iz] |
mu | integer | in | Staple is along mu direction | |
xi | real(kind=WP) | in | The gauge anisotropy |
Call graph
stapleRectangle
Computes the rectangle staple (1x2) as in the Symanzik improved action for one site
Attributes: pure
subroutine stapleRectangle(U, V, coord, mu, xi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
V | complex(kind=WC) | out | dimension(3, 3) | Output rectangle staple at this coordinate |
coord | integer | in | dimension(4) | Coordinate of the staple [it,ix,iy,iz] |
mu | integer | in | Staple is along mu direction | |
xi | real(kind=WP) | in | The gauge anisotropy |
Call graph
stapleSymanzik
Compute the tree-level Symanzik staple for one SU(3) link.
This consists of:
- the plaquette staple contribution (Wilson staple),
Attributes: pure
subroutine stapleSymanzik(U, V, coord, mu, xi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
V | complex(kind=WC) | out | dimension(3, 3) | Output tree-level Symanzik staple at this coordinate |
coord | integer | in | dimension(4) | Coordinate of the staple [it,ix,iy,iz] |
mu | integer | in | Staple is along mu direction | |
xi | real(kind=WP) | in | The gauge anisotropy |
Call graph
stapleIwasaki
Compute the Iwasaki staple for one SU(3) link.
This consists of:
- the plaquette staple contribution (Wilson staple),
- minus the weighted rectangle contribution.
With c0= 3.648, c1 = -0.331
Attributes: pure
subroutine stapleIwasaki(U, V, coord, mu, xi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
V | complex(kind=WC) | out | dimension(3, 3) | Output Iwasaki staple at this coordinate |
coord | integer | in | dimension(4) | Coordinate of the staple [it,ix,iy,iz] |
mu | integer | in | Staple is along mu direction | |
xi | real(kind=WP) | in | The gauge anisotropy |
Call graph
Functions
su3_updated_link
Compute updated SU(3) link at a single lattice site
Compute the updated SU(3) link at one site and one direction.
Steps:
- Extract the current link U_mu(coord).
- Compute either the Wilson or Symanzik staple.
- Form W = U * staple.
- Apply the three Cabibbo-Marinari SU(2) subgroup updates: (1,2), (1,3), (2,3)
- Reunitarize the final matrix.
Attributes: pure
Returns: complex(kind=WC)
function su3_updated_link(U, beta, coord, mu, key, dims4, stapleKernel, xi) result(Uout)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
U | complex(kind=WC) | in | dimension(:, :, :, :, :, :, 😃 | Input gaugefield [3,3,4,nt,nx,ny,nz] |
beta | real(kind=WP) | in | beta value | |
coord | integer | in | dimension(4) | Coordinate of link to be updated [it,ix,iy,iz] |
mu | integer | in | Direction of link | |
key | integer(kind=C64) | in | dimension(2) | Philox variable |
dims4 | integer | in | dimension(4) | Lattice dimensions [nt,nx,ny,nz] |
stapleKernel | procedure(stapleInterface) | in | pointer | Pointer used to switch which action is used |
xi | real(kind=WP) | in | The gauge anisotropy |
Call graph