-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathgauge_tools.h
119 lines (102 loc) · 4.35 KB
/
gauge_tools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#include <random_quda.h>
namespace quda {
/**
Compute the plaquette of the gauge field
@param U The gauge field upon which to compute the plaquette
@param location The locaiton where to do the computation
@return double3 variable returning (plaquette, spatial plaquette,
temporal plaquette) site averages normalized such that each
plaquette is in the range [0,1]
*/
double3 plaquette(const GaugeField& U,
QudaFieldLocation location);
/** Generate Gaussian distributed GaugeField
* @param dataDs The GaugeField
* @param rngstate random states
*/
void gaugeGauss(GaugeField &dataDs, RNG &rngstate);
/**
Apply APE smearing to the gauge field
@param dataDs Output smeared field
@param dataOr Input gauge field
@param alpha smearing parameter
*/
void APEStep (GaugeField &dataDs,
const GaugeField& dataOr,
double alpha);
/**
Apply STOUT smearing to the gauge field
@param dataDs Output smeared field
@param dataOr Input gauge field
@param rho smearing parameter
*/
void STOUTStep (GaugeField &dataDs,
const GaugeField& dataOr,
double rho);
/**
Apply Over Improved STOUT smearing to the gauge field
@param dataDs Output smeared field
@param dataOr Input gauge field
@param rho smearing parameter
@param epsilon smearing parameter
*/
void OvrImpSTOUTStep (GaugeField &dataDs,
const GaugeField& dataOr,
double rho, double epsilon);
/**
* @brief Gauge fixing with overrelaxation with support for single and multi GPU.
* @param[in,out] data, quda gauge field
* @param[in] gauge_dir, 3 for Coulomb gauge fixing, other for Landau gauge fixing
* @param[in] Nsteps, maximum number of steps to perform gauge fixing
* @param[in] verbose_interval, print gauge fixing info when iteration count is a multiple of this
* @param[in] relax_boost, gauge fixing parameter of the overrelaxation method, most common value is 1.5 or 1.7.
* @param[in] tolerance, torelance value to stop the method, if this
* value is zero then the method stops when iteration reachs the
* maximum number of steps defined by Nsteps
* @param[in] reunit_interval, reunitarize gauge field when iteration count is a multiple of this
* @param[in] stopWtheta, 0 for MILC criterium and 1 to use the theta value
*/
void gaugefixingOVR( cudaGaugeField& data,
const int gauge_dir,
const int Nsteps,
const int verbose_interval,
const double relax_boost,
const double tolerance,
const int reunit_interval,
const int stopWtheta);
/**
* @brief Gauge fixing with Steepest descent method with FFTs with support for single GPU only.
* @param[in,out] data, quda gauge field
* @param[in] gauge_dir, 3 for Coulomb gauge fixing, other for Landau gauge fixing
* @param[in] Nsteps, maximum number of steps to perform gauge fixing
* @param[in] verbose_interval, print gauge fixing info when iteration count is a multiple of this
* @param[in] alpha, gauge fixing parameter of the method, most common value is 0.08
* @param[in] autotune, 1 to autotune the method, i.e., if the Fg inverts its tendency we decrease the alpha value
* @param[in] tolerance, torelance value to stop the method, if this
* value is zero then the method stops when iteration reachs the
* maximum number of steps defined by Nsteps
* @param[in] stopWtheta, 0 for MILC criterium and 1 to use the theta value
*/
void gaugefixingFFT( cudaGaugeField& data, const int gauge_dir,
const int Nsteps,
const int verbose_interval,
const double alpha,
const int autotune,
const double tolerance,
const int stopWtheta);
/**
Compute the Fmunu tensor
@param Fmunu The Fmunu tensor
@param gauge The gauge field upon which to compute the Fmnu tensor
@param location The location of where to do the computation
*/
void computeFmunu(GaugeField &Fmunu,
const GaugeField& gauge,
QudaFieldLocation location);
/**
Compute the topological charge
@param Fmunu The Fmunu tensor, usually calculated from a smeared configuration
@param location The location of where to do the computation, currently supports only the GPU
*/
double computeQCharge(GaugeField& Fmunu, QudaFieldLocation location);
}