mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Implement IR improvement, with coefficients set in input file.
This commit is contained in:
parent
5f85473d6b
commit
f37ed4958b
@ -67,7 +67,8 @@ void TStochEm::execute(void)
|
||||
{
|
||||
LOG(Message) << "Generating stochastic EM potential..." << std::endl;
|
||||
|
||||
PhotonR photon(par().gauge, par().zmScheme, par().improvement);
|
||||
std::vector<Real> improvements = strToVec<Real>(par().improvement);
|
||||
PhotonR photon(par().gauge, par().zmScheme, improvements);
|
||||
auto &a = envGet(EmField, getName());
|
||||
auto &w = envGet(EmComp, "_" + getName() + "_weight");
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(StochEmPar,
|
||||
PhotonR::Gauge, gauge,
|
||||
PhotonR::ZmScheme, zmScheme,
|
||||
Integer, improvement);
|
||||
std::string, improvement);
|
||||
};
|
||||
|
||||
class TStochEm: public Module<StochEmPar>
|
||||
|
@ -61,7 +61,7 @@ void TUnitEm::setup(void)
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
void TUnitEm::execute(void)
|
||||
{
|
||||
PhotonR photon(0, 0, 0); // Just chose arbitrary input values here
|
||||
PhotonR photon(0, 0, std::vector<Real>()); // Just chose arbitrary input values here
|
||||
auto &a = envGet(EmField, getName());
|
||||
LOG(Message) << "Generating unit EM potential..." << std::endl;
|
||||
photon.UnitField(a);
|
||||
|
@ -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);
|
||||
public:
|
||||
Photon(Gauge gauge, ZmScheme zmScheme, Integer improvement);
|
||||
Photon(Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvements);
|
||||
virtual ~Photon(void) = default;
|
||||
void FreePropagator(const GaugeField &in, GaugeField &out);
|
||||
void MomentumSpacePropagator(const GaugeField &in, GaugeField &out);
|
||||
@ -75,14 +75,14 @@ namespace QCD{
|
||||
private:
|
||||
Gauge gauge_;
|
||||
ZmScheme zmScheme_;
|
||||
Integer improvement_;
|
||||
std::vector<Real> improvement_;
|
||||
};
|
||||
|
||||
typedef Photon<QedGimplR> PhotonR;
|
||||
|
||||
template<class Gimpl>
|
||||
Photon<Gimpl>::Photon(Gauge gauge, ZmScheme zmScheme, Integer improvement)
|
||||
: gauge_(gauge), zmScheme_(zmScheme), improvement_(improvement)
|
||||
Photon<Gimpl>::Photon(Gauge gauge, ZmScheme zmScheme, std::vector<Real> improvements)
|
||||
: gauge_(gauge), zmScheme_(zmScheme), improvement_(improvements)
|
||||
{}
|
||||
|
||||
template<class Gimpl>
|
||||
@ -157,29 +157,11 @@ namespace QCD{
|
||||
out = where(spNrm == Integer(0), 0.*out, out);
|
||||
|
||||
// IR improvement
|
||||
switch (improvement_)
|
||||
for(int i = 0; i < improvement_.size(); i++)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
Real f1 = sqrt(2.48560548);
|
||||
out = where(spNrm == Integer(1), f1*out, out);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
Real f1 = sqrt(4.93053406);
|
||||
Real f2 = sqrt(-1.44492857);
|
||||
out = where(spNrm == Integer(1), f1*out, out);
|
||||
out = where(spNrm == Integer(2), f2*out, out);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
Real f = sqrt(improvement_[i]+1);
|
||||
out = where(spNrm == Integer(i+1), f*out, out);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user