1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 17:25:37 +01:00

QedFVol: Add input parameter G(x=0) for infinite-volume photon

This commit is contained in:
James Harrison 2018-02-23 14:53:05 +00:00
parent 8e61286741
commit ec3954ff5f
4 changed files with 11 additions and 8 deletions

View File

@ -68,7 +68,7 @@ void TStochEm::execute(void)
LOG(Message) << "Generating stochastic EM potential..." << std::endl; LOG(Message) << "Generating stochastic EM potential..." << std::endl;
std::vector<Real> improvements = strToVec<Real>(par().improvement); std::vector<Real> improvements = strToVec<Real>(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 &a = envGet(EmField, getName());
auto &w = envGet(EmComp, "_" + getName() + "_weight"); auto &w = envGet(EmComp, "_" + getName() + "_weight");

View File

@ -45,7 +45,8 @@ public:
GRID_SERIALIZABLE_CLASS_MEMBERS(StochEmPar, GRID_SERIALIZABLE_CLASS_MEMBERS(StochEmPar,
PhotonR::Gauge, gauge, PhotonR::Gauge, gauge,
PhotonR::ZmScheme, zmScheme, PhotonR::ZmScheme, zmScheme,
std::string, improvement); std::string, improvement,
Real, G0_qedInf);
}; };
class TStochEm: public Module<StochEmPar> class TStochEm: public Module<StochEmPar>

View File

@ -61,7 +61,7 @@ void TUnitEm::setup(void)
// execution /////////////////////////////////////////////////////////////////// // execution ///////////////////////////////////////////////////////////////////
void TUnitEm::execute(void) void TUnitEm::execute(void)
{ {
PhotonR photon(0, 0, std::vector<Real>()); // Just chose arbitrary input values here PhotonR photon(0, 0, std::vector<Real>(), 0.0); // Just chose arbitrary input values here
auto &a = envGet(EmField, getName()); auto &a = envGet(EmField, getName());
LOG(Message) << "Generating unit EM potential..." << std::endl; LOG(Message) << "Generating unit EM potential..." << std::endl;
photon.UnitField(a); photon.UnitField(a);

View File

@ -60,7 +60,7 @@ namespace QCD{
GRID_SERIALIZABLE_ENUM(Gauge, undef, feynman, 1, coulomb, 2, landau, 3); GRID_SERIALIZABLE_ENUM(Gauge, undef, feynman, 1, coulomb, 2, landau, 3);
GRID_SERIALIZABLE_ENUM(ZmScheme, undef, qedL, 1, qedTL, 2, qedInf, 3); GRID_SERIALIZABLE_ENUM(ZmScheme, undef, qedL, 1, qedTL, 2, qedInf, 3);
public: public:
Photon(Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvements); Photon(Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvements, Real G0);
virtual ~Photon(void) = default; virtual ~Photon(void) = default;
void FreePropagator(const GaugeField &in, GaugeField &out); void FreePropagator(const GaugeField &in, GaugeField &out);
void MomentumSpacePropagator(const GaugeField &in, GaugeField &out); void MomentumSpacePropagator(const GaugeField &in, GaugeField &out);
@ -77,13 +77,15 @@ namespace QCD{
Gauge gauge_; Gauge gauge_;
ZmScheme zmScheme_; ZmScheme zmScheme_;
std::vector<Real> improvement_; std::vector<Real> improvement_;
Real G0_;
}; };
typedef Photon<QedGimplR> PhotonR; typedef Photon<QedGimplR> PhotonR;
template<class Gimpl> template<class Gimpl>
Photon<Gimpl>::Photon(Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvements) Photon<Gimpl>::Photon(Gauge gauge, ZmScheme zmScheme,
: gauge_(gauge), zmScheme_(zmScheme), improvement_(improvements) std::vector<Real> improvements, Real G0)
: gauge_(gauge), zmScheme_(zmScheme), improvement_(improvements), G0_(G0)
{} {}
template<class Gimpl> template<class Gimpl>
@ -109,7 +111,7 @@ namespace QCD{
std::vector<int> &l = grid->_fdimensions; std::vector<int> &l = grid->_fdimensions;
std::vector<int> x0(nd,0); std::vector<int> x0(nd,0);
TComplex Tone = Complex(1.0,0.0); TComplex Tone = Complex(1.0,0.0);
// TComplex Tzero = Complex(0.0,0.0); TComplex Tzero = Complex(G0_,0.0);
FFT fft(grid); FFT fft(grid);
one = Complex(1.0,0.0); one = Complex(1.0,0.0);
@ -123,7 +125,7 @@ namespace QCD{
} }
pokeSite(Tone, out, x0); pokeSite(Tone, out, x0);
out = one/out; out = one/out;
// pokeSite(Tzero, out, x0); pokeSite(Tzero, out, x0);
fft.FFT_all_dim(out, out, FFT::forward); fft.FFT_all_dim(out, out, FFT::forward);
} }