From ec3954ff5f1549ef43f8c81b57565f3990c910cb Mon Sep 17 00:00:00 2001 From: James Harrison Date: Fri, 23 Feb 2018 14:53:05 +0000 Subject: [PATCH] QedFVol: Add input parameter G(x=0) for infinite-volume photon --- extras/Hadrons/Modules/MGauge/StochEm.cc | 2 +- extras/Hadrons/Modules/MGauge/StochEm.hpp | 3 ++- extras/Hadrons/Modules/MGauge/UnitEm.cc | 2 +- lib/qcd/action/gauge/Photon.h | 12 +++++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/extras/Hadrons/Modules/MGauge/StochEm.cc b/extras/Hadrons/Modules/MGauge/StochEm.cc index 4c18b968..fec64699 100644 --- a/extras/Hadrons/Modules/MGauge/StochEm.cc +++ b/extras/Hadrons/Modules/MGauge/StochEm.cc @@ -68,7 +68,7 @@ void TStochEm::execute(void) LOG(Message) << "Generating stochastic EM potential..." << std::endl; std::vector improvements = strToVec(par().improvement); - PhotonR photon(par().gauge, par().zmScheme, improvements); + PhotonR photon(par().gauge, par().zmScheme, improvements, par().G0_qedInf); auto &a = envGet(EmField, getName()); auto &w = envGet(EmComp, "_" + getName() + "_weight"); diff --git a/extras/Hadrons/Modules/MGauge/StochEm.hpp b/extras/Hadrons/Modules/MGauge/StochEm.hpp index 11519b52..8ed58c4b 100644 --- a/extras/Hadrons/Modules/MGauge/StochEm.hpp +++ b/extras/Hadrons/Modules/MGauge/StochEm.hpp @@ -45,7 +45,8 @@ public: GRID_SERIALIZABLE_CLASS_MEMBERS(StochEmPar, PhotonR::Gauge, gauge, PhotonR::ZmScheme, zmScheme, - std::string, improvement); + std::string, improvement, + Real, G0_qedInf); }; class TStochEm: public Module diff --git a/extras/Hadrons/Modules/MGauge/UnitEm.cc b/extras/Hadrons/Modules/MGauge/UnitEm.cc index e23840f5..ad842584 100644 --- a/extras/Hadrons/Modules/MGauge/UnitEm.cc +++ b/extras/Hadrons/Modules/MGauge/UnitEm.cc @@ -61,7 +61,7 @@ void TUnitEm::setup(void) // execution /////////////////////////////////////////////////////////////////// void TUnitEm::execute(void) { - PhotonR photon(0, 0, std::vector()); // Just chose arbitrary input values here + PhotonR photon(0, 0, std::vector(), 0.0); // Just chose arbitrary input values here auto &a = envGet(EmField, getName()); LOG(Message) << "Generating unit EM potential..." << std::endl; photon.UnitField(a); diff --git a/lib/qcd/action/gauge/Photon.h b/lib/qcd/action/gauge/Photon.h index 2bdf70dd..bcfe40e0 100644 --- a/lib/qcd/action/gauge/Photon.h +++ b/lib/qcd/action/gauge/Photon.h @@ -60,7 +60,7 @@ namespace QCD{ GRID_SERIALIZABLE_ENUM(Gauge, undef, feynman, 1, coulomb, 2, landau, 3); GRID_SERIALIZABLE_ENUM(ZmScheme, undef, qedL, 1, qedTL, 2, qedInf, 3); public: - Photon(Gauge gauge, ZmScheme zmScheme, std::vector improvements); + Photon(Gauge gauge, ZmScheme zmScheme, std::vector improvements, Real G0); virtual ~Photon(void) = default; void FreePropagator(const GaugeField &in, GaugeField &out); void MomentumSpacePropagator(const GaugeField &in, GaugeField &out); @@ -77,13 +77,15 @@ namespace QCD{ Gauge gauge_; ZmScheme zmScheme_; std::vector improvement_; + Real G0_; }; typedef Photon PhotonR; template - Photon::Photon(Gauge gauge, ZmScheme zmScheme, std::vector improvements) - : gauge_(gauge), zmScheme_(zmScheme), improvement_(improvements) + Photon::Photon(Gauge gauge, ZmScheme zmScheme, + std::vector improvements, Real G0) + : gauge_(gauge), zmScheme_(zmScheme), improvement_(improvements), G0_(G0) {} template @@ -109,7 +111,7 @@ namespace QCD{ std::vector &l = grid->_fdimensions; std::vector x0(nd,0); TComplex Tone = Complex(1.0,0.0); - // TComplex Tzero = Complex(0.0,0.0); + TComplex Tzero = Complex(G0_,0.0); FFT fft(grid); one = Complex(1.0,0.0); @@ -123,7 +125,7 @@ namespace QCD{ } pokeSite(Tone, out, x0); out = one/out; - // pokeSite(Tzero, out, x0); + pokeSite(Tzero, out, x0); fft.FFT_all_dim(out, out, FFT::forward); }