39 typedef typename Simd::scalar_type
Scalar;
41 template <
typename vtype>
43 template <
typename vtype>
57 template <
class GImpl>
62 typedef typename SiteGaugeLink::scalar_object
ScalarSite;
67 Photon(
GridBase *grid, Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvement);
75 const GaugeLinkField &weight);
79 void makeKHat(std::vector<GaugeLinkField> &khat);
81 void zmSub(GaugeLinkField &out);
95 std::vector<Real> improvements)
101 :
Photon(grid, gauge, zmScheme, std::vector<
Real>())
104 template<
class GImpl>
108 GaugeField in_k(
grid_);
109 GaugeField prop_k(
grid_);
116 template<
class GImpl>
120 auto l =
grid_->FullDimensions();
123 for(
int mu = 0; mu <
grid_->Nd() - 1; mu++)
126 coor = where(coor <
Integer(l[mu]/2), coor, coor -
Integer(l[mu]));
127 spNrm = spNrm + coor*coor;
131 template<
class GImpl>
134 const unsigned int nd =
grid_->Nd();
135 auto l =
grid_->FullDimensions();
138 khat.resize(nd,
grid_);
139 for (
unsigned int mu = 0; mu < nd; ++mu)
144 khat[mu] =
exp(piL*ci*khat[mu])*2.*
sin(piL*khat[mu]);
148 template<
class GImpl>
151 std::vector<GaugeLinkField> khat;
152 GaugeLinkField lone(
grid_);
153 const unsigned int nd =
grid_->Nd();
159 for(
int mu = 0; mu < nd; mu++)
161 out = out + khat[mu]*
conjugate(khat[mu]);
169 template<
class GImpl>
174 case ZmScheme::qedTL:
187 out = where(spNrm ==
Integer(0), 0.*out, out);
191 out = where(spNrm ==
Integer(i + 1), f*out, out);
201 template<
class GImpl>
204 const unsigned int nd =
grid_->Nd();
207 std::vector<GaugeLinkField> khat, a(nd,
grid_), aProj(nd,
grid_);
212 for (
unsigned int mu = 0; mu < nd; ++mu)
221 invKHat = where(spNrm ==
Integer(0), cst, invKHat);
222 invKHat = cst/invKHat;
224 invKHat = where(spNrm ==
Integer(0), cst, invKHat);
226 for (
unsigned int nu = 0; nu < nd - 1; ++nu)
231 for (
unsigned int mu = 0; mu < nd; ++mu)
233 aProj[mu] = a[mu] - khat[mu]*spdiv;
238 template<
class GImpl>
257 template<
class GImpl>
269 template<
class GImpl>
272 const unsigned int nd =
grid_->Nd();
273 auto l =
grid_->FullDimensions();
276 for(
unsigned int mu = 0; mu < nd; mu++)
285 template<
class GImpl>
288 GaugeLinkField weight(
grid_);
294 template<
class GImpl>
296 const GaugeLinkField &weight)
298 const unsigned int nd =
grid_->Nd();
299 GaugeLinkField r(
grid_);
300 GaugeField aTilde(
grid_);
303 for(
unsigned int mu = 0; mu < nd; mu++)
314 template<
class GImpl>
317 const unsigned int nd =
grid_->Nd();
318 GaugeLinkField r(
grid_);
321 for(
unsigned int mu = 0; mu < nd; mu++)
AcceleratorVector< int, MaxDims > Coordinate
accelerator_inline Grid_simd< S, V > sin(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > exp(const Grid_simd< S, V > &r)
accelerator_inline Grid_simd< S, V > sqrt(const Grid_simd< S, V > &r)
void LatticeCoordinate(Lattice< iobj > &l, int mu)
void pokeSite(const sobj &s, Lattice< vobj > &l, const Coordinate &site)
Lattice< vobj > real(const Lattice< vobj > &lhs)
Lattice< vobj > conjugate(const Lattice< vobj > &lhs)
void gaussian(GridParallelRNG &rng, Lattice< vobj > &l)
#define NAMESPACE_BEGIN(A)
Photon< QedGImplR > PhotonR
QedGImpl< vComplex > QedGImplR
void pokeLorentz(Lattice< vobj > &lhs, const Lattice< decltype(peekIndex< LorentzIndex >(vobj(), 0))> &rhs, int i)
Lattice< vTInteger > LatticeInteger
Lattice< vTComplex > LatticeComplex
auto peekLorentz(const vobj &rhs, int i) -> decltype(PeekIndex< LorentzIndex >(rhs, 0))
std::complex< Real > Complex
static const int backward
void FFT_all_dim(Lattice< vobj > &result, const Lattice< vobj > &source, int sign)
void UnitField(GaugeField &out)
void zmSub(GaugeLinkField &out)
void FreePropagator(const GaugeField &in, GaugeField &out)
void makeKHat(std::vector< GaugeLinkField > &khat)
void StochasticWeight(GaugeLinkField &weight)
void gaugeTransform(GaugeField &out)
void StochasticField(GaugeField &out, GridParallelRNG &rng, const GaugeLinkField &weight)
void MomentumSpacePropagator(const GaugeField &in, GaugeField &out)
void StochasticField(GaugeField &out, GridParallelRNG &rng)
void makeInvKHatSquared(GaugeLinkField &out)
SiteGaugeLink::scalar_object ScalarSite
virtual ~Photon(void)=default
Photon(GridBase *grid, Gauge gauge, ZmScheme zmScheme)
std::vector< Real > improvement_
GRID_SERIALIZABLE_ENUM(ZmScheme, undef, qedL, 1, qedTL, 2)
ScalarSite::scalar_type ScalarComplex
INHERIT_GIMPL_TYPES(GImpl)
void transverseProjectSpatial(GaugeField &out)
GRID_SERIALIZABLE_ENUM(Gauge, undef, feynman, 1, coulomb, 2, landau, 3)
void makeSpatialNorm(LatticeInteger &spNrm)
Photon(GridBase *grid, Gauge gauge, ZmScheme zmScheme, std::vector< Real > improvement)
Lattice< SiteField > Field
Lattice< SiteLink > LinkField
iVector< iScalar< iScalar< vtype > >, Nd > iImplGaugeField
iImplGaugeField< Simd > SiteField
iImplGaugeLink< Simd > SiteLink
iScalar< iScalar< iScalar< vtype > > > iImplGaugeLink