Grid 0.7.0
WilsonCloverFermion.h
Go to the documentation of this file.
1/*************************************************************************************
2
3 Grid physics library, www.github.com/paboyle/Grid
4
5 Source file: ./lib/qcd/action/fermion/WilsonCloverFermion.h
6
7 Copyright (C) 2017 - 2022
8
9 Author: Guido Cossu <guido.cossu@ed.ac.uk>
10 Author: David Preti <>
11 Author: Daniel Richtmann <daniel.richtmann@gmail.com>
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License along
24 with this program; if not, write to the Free Software Foundation, Inc.,
25 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26
27 See the full license in the file "LICENSE" in the top level distribution directory
28 *************************************************************************************/
29/* END LEGAL */
30
31#pragma once
32
36
38
40// Wilson Clover
41//
42// Operator ( with anisotropy coefficients):
43//
44// Q = 1 + (Nd-1)/xi_0 + m
45// + W_t + (nu/xi_0) * W_s
46// - 1/2*[ csw_t * sum_s (sigma_ts F_ts) + (csw_s/xi_0) * sum_ss (sigma_ss F_ss) ]
47//
48// s spatial, t temporal directions.
49// where W_t and W_s are the temporal and spatial components of the
50// Wilson Dirac operator
51//
52// csw_r = csw_t to recover the isotropic version
54
55template<class Impl, class CloverHelpers>
57 public WilsonCloverHelpers<Impl>
58{
59public:
62
65
66 virtual int ConstEE(void) { return 0; };
67 virtual void Instantiatable(void){};
68 // Constructors
69 WilsonCloverFermion(GaugeField &_Umu, GridCartesian &Fgrid,
71 const RealD _mass,
72 const RealD _csw_r = 0.0,
73 const RealD _csw_t = 0.0,
75 const ImplParams &impl_p = ImplParams());
76
77 virtual void M(const FermionField &in, FermionField &out);
78 virtual void Mdag(const FermionField &in, FermionField &out);
79 virtual void Mooee(const FermionField &in, FermionField &out);
80 virtual void MooeeDag(const FermionField &in, FermionField &out);
81 virtual void MooeeInv(const FermionField &in, FermionField &out);
82 virtual void MooeeInvDag(const FermionField &in, FermionField &out);
83 virtual void MooeeInternal(const FermionField &in, FermionField &out, int dag, int inv);
84
85 //virtual void MDeriv(GaugeField &mat, const FermionField &U, const FermionField &V, int dag);
86 virtual void MooDeriv(GaugeField &mat, const FermionField &U, const FermionField &V, int dag);
87 virtual void MeeDeriv(GaugeField &mat, const FermionField &U, const FermionField &V, int dag);
88
89 void ImportGauge(const GaugeField &_Umu);
90
91 // Derivative parts unpreconditioned pseudofermions
92 void MDeriv(GaugeField &force, const FermionField &X, const FermionField &Y, int dag);
93
94public:
95 // here fixing the 4 dimensions, make it more general?
96
97 RealD csw_r; // Clover coefficient - spatial
98 RealD csw_t; // Clover coefficient - temporal
99 RealD diag_mass; // Mass term
100 CloverField CloverTerm, CloverTermInv; // Clover term
101 CloverField CloverTermEven, CloverTermOdd; // Clover term EO
102 CloverField CloverTermInvEven, CloverTermInvOdd; // Clover term Inv EO
103 CloverField CloverTermDagEven, CloverTermDagOdd; // Clover term Dag EO
104 CloverField CloverTermInvDagEven, CloverTermInvDagOdd; // Clover term Inv Dag EO
105};
106
108
109
110
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
double RealD
Definition Simd.h:61
static INTERNAL_PRECISION U
Definition Zolotarev.cc:230
virtual void MooeeInternal(const FermionField &in, FermionField &out, int dag, int inv)
virtual void MeeDeriv(GaugeField &mat, const FermionField &U, const FermionField &V, int dag)
virtual void MooeeInv(const FermionField &in, FermionField &out)
WilsonCloverFermion(GaugeField &_Umu, GridCartesian &Fgrid, GridRedBlackCartesian &Hgrid, const RealD _mass, const RealD _csw_r=0.0, const RealD _csw_t=0.0, const WilsonAnisotropyCoefficients &clover_anisotropy=WilsonAnisotropyCoefficients(), const ImplParams &impl_p=ImplParams())
void MDeriv(GaugeField &force, const FermionField &X, const FermionField &Y, int dag)
virtual void Mdag(const FermionField &in, FermionField &out)
virtual void Mooee(const FermionField &in, FermionField &out)
virtual void M(const FermionField &in, FermionField &out)
virtual void MooeeInvDag(const FermionField &in, FermionField &out)
virtual void MooDeriv(GaugeField &mat, const FermionField &U, const FermionField &V, int dag)
virtual void MooeeDag(const FermionField &in, FermionField &out)
WilsonFermion(GaugeField &_Umu, GridCartesian &Fgrid, GridRedBlackCartesian &Hgrid, RealD _mass, const ImplParams &p=ImplParams(), const WilsonAnisotropyCoefficients &anis=WilsonAnisotropyCoefficients())