Grid 0.7.0
DomainWallEOFAFermion.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/qcd/action/fermion/DomainWallEOFAFermion.h
6
7Copyright (C) 2017
8
9Author: Peter Boyle <pabobyle@ph.ed.ac.uk>
10Author: Peter Boyle <paboyle@ph.ed.ac.uk>
11Author: David Murphy <dmurphy@phys.columbia.edu>
12
13This program is free software; you can redistribute it and/or modify
14it under the terms of the GNU General Public License as published by
15the Free Software Foundation; either version 2 of the License, or
16(at your option) any later version.
17
18This program is distributed in the hope that it will be useful,
19but WITHOUT ANY WARRANTY; without even the implied warranty of
20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License along
24with this program; if not, write to the Free Software Foundation, Inc.,
2551 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26
27See the full license in the file "LICENSE" in the top level distribution directory
28*************************************************************************************/
29 /* END LEGAL */
30#pragma once
31
33
35
36template<class Impl>
38{
39public:
41
42public:
43 // Modified (0,Ls-1) and (Ls-1,0) elements of Mooee
44 // for red-black preconditioned Shamir EOFA
45 Coeff_t dm;
46 Coeff_t dp;
47
48 virtual void Instantiatable(void) {};
49
50 // EOFA-specific operations
51 virtual void Omega (const FermionField& in, FermionField& out, int sign, int dag);
52 virtual void Dtilde (const FermionField& in, FermionField& out);
53 virtual void DtildeInv (const FermionField& in, FermionField& out);
54
55 // override multiply
56 virtual void M (const FermionField& in, FermionField& out);
57 virtual void Mdag (const FermionField& in, FermionField& out);
58
59 // half checkerboard operations
60 virtual void Mooee (const FermionField& in, FermionField& out);
61 virtual void MooeeDag (const FermionField& in, FermionField& out);
62 virtual void MooeeInv (const FermionField& in, FermionField& out);
63 virtual void MooeeInvDag(const FermionField& in, FermionField& out);
64
65 virtual void M5D (const FermionField& psi, FermionField& chi);
66 virtual void M5Ddag (const FermionField& psi, FermionField& chi);
67
69 // Instantiate different versions depending on Impl
71 void M5D(const FermionField& psi, const FermionField& phi, FermionField& chi,
72 std::vector<Coeff_t>& lower, std::vector<Coeff_t>& diag, std::vector<Coeff_t>& upper);
73
74 void M5Ddag(const FermionField& psi, const FermionField& phi, FermionField& chi,
75 std::vector<Coeff_t>& lower, std::vector<Coeff_t>& diag, std::vector<Coeff_t>& upper);
76
77 virtual void RefreshShiftCoefficients(RealD new_shift);
78
79 // Constructors
80 DomainWallEOFAFermion(GaugeField& _Umu, GridCartesian& FiveDimGrid, GridRedBlackCartesian& FiveDimRedBlackGrid,
81 GridCartesian& FourDimGrid, GridRedBlackCartesian& FourDimRedBlackGrid,
82 RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int pm,
83 RealD _M5, const ImplParams& p=ImplParams());
84
85protected:
86 void SetCoefficientsInternal(RealD zolo_hi, std::vector<Coeff_t>& gamma, RealD b, RealD c);
87};
88
90
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
double RealD
Definition Simd.h:61
AbstractEOFAFermion(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int _pm, RealD _M5, RealD _b, RealD _c, const ImplParams &p=ImplParams())
virtual void Instantiatable(void)
virtual void MooeeInv(const FermionField &in, FermionField &out)
virtual void M5D(const FermionField &psi, FermionField &chi)
virtual void Dtilde(const FermionField &in, FermionField &out)
void M5D(const FermionField &psi, const FermionField &phi, FermionField &chi, std::vector< Coeff_t > &lower, std::vector< Coeff_t > &diag, std::vector< Coeff_t > &upper)
virtual void M5Ddag(const FermionField &psi, FermionField &chi)
virtual void M(const FermionField &in, FermionField &out)
virtual void Mooee(const FermionField &in, FermionField &out)
void M5Ddag(const FermionField &psi, const FermionField &phi, FermionField &chi, std::vector< Coeff_t > &lower, std::vector< Coeff_t > &diag, std::vector< Coeff_t > &upper)
virtual void DtildeInv(const FermionField &in, FermionField &out)
virtual void RefreshShiftCoefficients(RealD new_shift)
void SetCoefficientsInternal(RealD zolo_hi, std::vector< Coeff_t > &gamma, RealD b, RealD c)
virtual void Mdag(const FermionField &in, FermionField &out)
DomainWallEOFAFermion(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int pm, RealD _M5, const ImplParams &p=ImplParams())
virtual void Omega(const FermionField &in, FermionField &out, int sign, int dag)
virtual void MooeeInvDag(const FermionField &in, FermionField &out)
virtual void MooeeDag(const FermionField &in, FermionField &out)