29#ifndef GRID_GAUGE_IMPL_TYPES_H
30#define GRID_GAUGE_IMPL_TYPES_H
38#define HMC_MOMENTUM_DENOMINATOR (2.0)
40#define HMC_MOMENTUM_DENOMINATOR (1.0)
47#define INHERIT_GIMPL_TYPES(GImpl) \
48 typedef typename GImpl::Simd Simd; \
49 typedef typename GImpl::Scalar Scalar; \
50 typedef typename GImpl::LinkField GaugeLinkField; \
51 typedef typename GImpl::Field GaugeField; \
52 typedef typename GImpl::ComplexField ComplexField;\
53 typedef typename GImpl::SiteField SiteGaugeField; \
54 typedef typename GImpl::SiteComplex SiteComplex; \
55 typedef typename GImpl::SiteLink SiteGaugeLink;
57#define INHERIT_FIELD_TYPES(Impl) \
58 typedef typename Impl::Simd Simd; \
59 typedef typename Impl::ComplexField ComplexField; \
60 typedef typename Impl::SiteField SiteField; \
61 typedef typename Impl::Field Field;
64template <
class S,
int Nrepresentation = Nc,
int Nexp = 12,
class Group = SU<Nc> >
class GaugeImplTypes {
92 U_v[ss](mu) = U_v[ss](mu) + W_v[ss]();
121 for (
int mu = 0; mu <
Nd; mu++) {
122 Group::GaussianFundamentalLieAlgebraMatrix(pRNG, Pmu);
131 Group::taProj(P, ret);
142 for (int mu = 0; mu < Nd; mu++) {
143 U_v[ss](mu) = Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu);
144 U_v[ss](mu) = Group::ProjectOnGeneralGroup(U_v[ss](mu));
155 for (
int mu = 0; mu <
Nd; mu++) {
157 Hloc +=
trace(Umu * Umu);
164 Group::ProjectOnSpecialGroup(
U);
168 Group::HotConfiguration(pRNG,
U);
172 Group::TepidConfiguration(pRNG,
U);
176 Group::ColdConfiguration(pRNG,
U);
#define accelerator_for(iterator, num, nsimd,...)
GaugeImplTypes< vComplex, Nc, 12, Sp< Nc > > SpGimplTypesR
GaugeImplTypes< vComplexF, Nc > GimplTypesF
GaugeImplTypes< vComplexD, Nc, 12, Sp< Nc > > SpGimplTypesD
#define HMC_MOMENTUM_DENOMINATOR
GaugeImplTypes< vComplex, SU< Nc >::AdjointDimension > GimplAdjointTypesR
GaugeImplTypes< vComplexF, Nc, 12, Sp< Nc > > SpGimplTypesF
GaugeImplTypes< vComplexF, SU< Nc >::AdjointDimension > GimplAdjointTypesF
GaugeImplTypes< vComplex, Nc > GimplTypesR
GaugeImplTypes< vComplexD, SU< Nc >::AdjointDimension > GimplAdjointTypesD
GaugeImplTypes< vComplexD, Nc > GimplTypesD
accelerator_inline Grid_simd2< S, V > trace(const Grid_simd2< S, V > &arg)
accelerator_inline Grid_simd< S, V > sqrt(const Grid_simd< S, V > &r)
void PokeIndex(Lattice< vobj > &lhs, const Lattice< decltype(peekIndex< Index >(vobj(), 0))> &rhs, int i)
auto PeekIndex(const Lattice< vobj > &lhs, int i) -> Lattice< decltype(peekIndex< Index >(vobj(), i))>
vobj::scalar_object sum(const vobj *arg, Integer osites)
#define autoView(l_v, l, mode)
#define NAMESPACE_BEGIN(A)
Lattice< vTComplex > LatticeComplex
accelerator_inline std::enable_if<!isGridTensor< T >::value, T >::type TensorRemove(T arg)
static INTERNAL_PRECISION U
static void Project(Field &U)
static void HotConfiguration(GridParallelRNG &pRNG, Field &U)
static const int num_colours
iImplGaugeField< Simd > SiteField
iImplScalar< Simd > SiteComplex
Lattice< SiteField > Field
iScalar< iScalar< iMatrix< vtype, Nrepresentation > > > iImplGaugeLink
iVector< iScalar< iMatrix< vtype, Nrepresentation > >, Nd > iImplGaugeField
Lattice< SiteComplex > ComplexField
iImplGaugeLink< Simd > SiteLink
static Field projectForce(Field &P)
static void TepidConfiguration(GridParallelRNG &pRNG, Field &U)
static void generate_momenta(Field &P, GridSerialRNG &sRNG, GridParallelRNG &pRNG)
static RealD FieldSquareNorm(Field &U)
Simd::scalar_type scalar_type
iScalar< iScalar< iScalar< vtype > > > iImplScalar
static void AddLink(Field &U, LinkField &W, int mu)
static void ColdConfiguration(GridParallelRNG &pRNG, Field &U)
Lattice< SiteLink > LinkField
static void update_field(Field &P, Field &U, double ep)
GridBase * Grid(void) const