10 if (
param.su_project) {
16 if (*num_failures_h > 0)
errorQuda(
"Error in the SU(3) unitarization: %d failures\n", *num_failures_h);
20 if (
param.compute_plaquette) {
22 param.plaquette[0] = plaq.x;
23 param.plaquette[1] = plaq.y;
24 param.plaquette[2] = plaq.z;
29 if (!
param.compute_qcharge && !
param.compute_qcharge_density)
return;
35 for (
int i = 0; i < 4; i++) x[i] = u.
X()[i] - 2 * u.
R()[i];
48 if (
param.compute_qcharge ||
param.compute_qcharge_density) {
51 if (
param.compute_qcharge_density && !
param.qcharge_density)
52 errorQuda(
"Charge density requested, but destination field not defined");
59 if (
param.compute_qcharge_density)
66 if (
param.compute_qcharge_density) {
68 qudaMemcpy(
param.qcharge_density, d_qDensity, size, cudaMemcpyDeviceToHost);
QudaPrecision Precision() const
@ QUDA_FLOAT2_GAUGE_ORDER
#define pool_pinned_malloc(size)
#define pool_device_malloc(size)
#define pool_pinned_free(ptr)
#define pool_device_free(ptr)
#define get_mapped_device_pointer(ptr)
void gaugeObservables(GaugeField &u, QudaGaugeObservableParam ¶m, TimeProfile &profile)
Calculates a variety of gauge-field observables.
double3 plaquette(const GaugeField &U)
Compute the plaquette of the gauge field.
void computeQCharge(double energy[3], double &qcharge, const GaugeField &Fmunu)
Compute the topological charge and field energy.
void computeFmunu(GaugeField &Fmunu, const GaugeField &gauge)
Compute the Fmunu tensor.
void projectSU3(GaugeField &U, double tol, int *fails)
Project the input gauge field onto the SU(3) group. This is a destructive operation....
void computeQChargeDensity(double energy[3], double &qcharge, void *qdensity, const GaugeField &Fmunu)
Compute the topological charge, field energy and the topological charge density per lattice site.
#define qudaMemcpy(dst, src, count, kind)
QudaGaugeFieldOrder order
QudaGhostExchange ghostExchange
QudaSiteSubset siteSubset