Skip to content

Commit

Permalink
Update docs again
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaFuwa committed Jun 25, 2024
1 parent 6b831af commit 0c992f5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions docs/src/dirac.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Dirac operators are structs that hold a reference to the gauge background `U`, a temporary
fermion field in case one wants to use the doubly flavoured Hermitian variant, the bare mass
and the a Boolean indicating whether there are antiperiodic boundary conditions in the time
direction (yes, only periodic and antiperiodic BCs are supported so far). \\
direction (yes, only periodic and antiperiodic BCs are supported so far).

To create a Dirac operators, use the constructors below. One thing to note is that dirac
operators can be constructed using any `Abstractfield` and so the gauge background is always
set to `nothing` on construction. In order to then add a gauge background, must use the
set to `nothing` on construction. In order to then add a gauge background you must use the
dirac operator as a functor on a `Gaugefield`, like `D_U = D_free(U)` (This does not
overwrite the `U` in `D_free` but creates a new dirac operator, that references the same
temporary fermion field as the parent).
Expand Down
25 changes: 14 additions & 11 deletions docs/src/gaugefields.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,34 @@ beta = 6.0
U = Gaugefield{backend,prec,action}(Ns, Ns, Ns, Nt, beta) # all links are set to 0
```
and set the initial conditions with `identity_gauges!(U)` (cold) or
`random_gauges!(U)` (hot). \\
Gaugefields and the other two fields conatining group/algebra valued elements are structs
that contain a main Array `U`, which is a 5-dimensional array of statically sized 3x3
complex matrices, i.e., `SMatrix` objects from `StaticArrays.jl` (where arrays are stored as
Tuples under the hood. The different backends are handled by `Kernelabstractions.jl` which
exports a `zeros` method such that the array can be created on all supported backends with
no extra work. \\
`random_gauges!(U)` (hot).

`Gaugefield`s, `Colorfield`s and `Expfield`s are structs that contain a main Array `U`,
which is a 5-dimensional array of statically sized 3x3 complex matrices, i.e., `SMatrix`
objects from `StaticArrays.jl` (where arrays are stored as Tuples under the hood.

The fact that the elements are statically sized immutable arrays means that, for one, there
are no allocations when performing linear algebra operations with them and secondly that we
always just override the matrices in the arrays instead of mutating them. This
yields enormous benefits in terms of less headaches during development and lets us define
custom linear algebra routines for SMatrices and SVectors. \\
custom linear algebra routines for SMatrices and SVectors.

The different backends are handled by `Kernelabstractions.jl`.

There are no plans to use more memory efficient storage schemes for SU(3) or su(3) elements
yet. \\
yet.

Fermion fields or spinors or whatever you want to call them are stored in 4-dimensional
arrays of `n_color * n_dirac` complex valued `SVector`s. The reason for chosing 4 instead of
5 dimensions is that this enabled us to write routines that take care of all dirac
components at the same time, which is more efficient (I think). \\
components at the same time, which is more efficient (I think).

When using even-odd preconditioned dirac operators, the fermion fields get wrapped in a
struct called `EvenOdd` such that we can overload all functions on that type. Our convention
is to define the fields on the even sites. While we haven't tested whether the following is
actually more performant, we map all even sites to the first half of the array to have
contiguous memory accesses. The function `eo_site` does exactly this mapping. \\
contiguous memory accesses. The function `eo_site` does exactly this mapping.

`Fermionfield`s are created in the same way as `Gaugefield`s bar the gauge action type
parameter. For `Fermionfield`s we have the `ones!` and `gaussian_pseudofermions!` methods
to init them.
Expand Down
1 change: 1 addition & 0 deletions docs/src/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@ end
Base.@kwdef mutable struct MeasurementParameters
measurement_method::Vector{Dict} = Dict[]
end
```

0 comments on commit 0c992f5

Please sign in to comment.