Grid 0.7.0
WilsonCloverTypes.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/WilsonCloverTypes.h
6
7 Copyright (C) 2021 - 2022
8
9 Author: Daniel Richtmann <daniel.richtmann@gmail.com>
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License along
22 with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25 See the full license in the file "LICENSE" in the top level distribution directory
26*************************************************************************************/
27/* END LEGAL */
28
29#pragma once
30
32
33template<class Impl>
44
45template<class Impl>
47public:
49
50 static constexpr int Nred = Nc * Nhs; // 6
51 static constexpr int Nblock = Nhs; // 2
52 static constexpr int Ndiagonal = Nred; // 6
53 static constexpr int Ntriangle = (Nred - 1) * Nc; // 15
54
57
61
65};
66
67#define INHERIT_CLOVER_TYPES(Impl) \
68 typedef typename WilsonCloverTypes<Impl>::SiteClover SiteClover; \
69 typedef typename WilsonCloverTypes<Impl>::CloverField CloverField;
70
71#define INHERIT_COMPACT_CLOVER_TYPES(Impl) \
72 typedef typename CompactWilsonCloverTypes<Impl>::SiteCloverDiagonal SiteCloverDiagonal; \
73 typedef typename CompactWilsonCloverTypes<Impl>::SiteCloverTriangle SiteCloverTriangle; \
74 typedef typename CompactWilsonCloverTypes<Impl>::SiteMask SiteMask; \
75 typedef typename CompactWilsonCloverTypes<Impl>::CloverDiagonalField CloverDiagonalField; \
76 typedef typename CompactWilsonCloverTypes<Impl>::CloverTriangleField CloverTriangleField; \
77 typedef typename CompactWilsonCloverTypes<Impl>::MaskField MaskField; \
78 /* ugly duplication but needed inside functionality classes */ \
79 template<typename vtype> using iImplCloverDiagonal = \
80 iScalar<iVector<iVector<vtype, CompactWilsonCloverTypes<Impl>::Ndiagonal>, CompactWilsonCloverTypes<Impl>::Nblock>>; \
81 template<typename vtype> using iImplCloverTriangle = \
82 iScalar<iVector<iVector<vtype, CompactWilsonCloverTypes<Impl>::Ntriangle>, CompactWilsonCloverTypes<Impl>::Nblock>>;
83
84#define INHERIT_COMPACT_CLOVER_SIZES(Impl) \
85 static constexpr int Nred = CompactWilsonCloverTypes<Impl>::Nred; \
86 static constexpr int Nblock = CompactWilsonCloverTypes<Impl>::Nblock; \
87 static constexpr int Ndiagonal = CompactWilsonCloverTypes<Impl>::Ndiagonal; \
88 static constexpr int Ntriangle = CompactWilsonCloverTypes<Impl>::Ntriangle;
89
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
static constexpr int Nhs
Definition QCD.h:53
static constexpr int Ns
Definition QCD.h:51
static constexpr int Nc
Definition QCD.h:50
iScalar< iScalar< iScalar< vtype > > > iSinglet
Definition QCD.h:102
iImplCloverTriangle< Simd > SiteCloverTriangle
iScalar< iVector< iVector< vtype, Ndiagonal >, Nblock > > iImplCloverDiagonal
iImplCloverDiagonal< Simd > SiteCloverDiagonal
static constexpr int Ntriangle
static constexpr int Nblock
iScalar< iVector< iVector< vtype, Ntriangle >, Nblock > > iImplCloverTriangle
static constexpr int Nred
static constexpr int Ndiagonal
Lattice< SiteCloverDiagonal > CloverDiagonalField
Lattice< SiteMask > MaskField
Lattice< SiteCloverTriangle > CloverTriangleField
iImplClover< Simd > SiteClover
iScalar< iMatrix< iMatrix< vtype, Impl::Dimension >, Ns > > iImplClover
Lattice< SiteClover > CloverField