1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 15:55:37 +00:00

QedFVol: first attempt at generating a QED field

This commit is contained in:
Antonin Portelli 2016-10-21 15:21:32 +01:00
parent ab31ad006a
commit 0d889b7041

View File

@ -4,6 +4,31 @@ using namespace Grid;
using namespace QCD; using namespace QCD;
using namespace QedFVol; using namespace QedFVol;
template <class S>
class QedGimpl
{
public:
typedef S Simd;
template <typename vtype>
using iImplGaugeLink = iScalar<iScalar<iScalar<vtype>>>;
template <typename vtype>
using iImplGaugeField = iVector<iScalar<iScalar<vtype>>, Nd>;
typedef iImplGaugeLink<Simd> SiteGaugeLink;
typedef iImplGaugeField<Simd> SiteGaugeField;
typedef Lattice<SiteGaugeLink> GaugeLinkField; // bit ugly naming; polarised
// gauge field, lorentz... all
// ugly
typedef Lattice<SiteGaugeField> GaugeField;
};
typedef QedGimpl<vComplex> QedGimplR;
typedef Photon<QedGimplR> PhotonR;
typedef PhotonR::GaugeField EmField;
typedef PhotonR::GaugeLinkField EmComp;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// parse command line // parse command line
@ -26,8 +51,19 @@ int main(int argc, char *argv[])
QedFVolLogDebug.Active(GridLogDebug.isActive()); QedFVolLogDebug.Active(GridLogDebug.isActive());
LOG(Message) << "Grid initialized" << std::endl; LOG(Message) << "Grid initialized" << std::endl;
// QED stuff
std::vector<int> latt_size = GridDefaultLatt();
std::vector<int> simd_layout = GridDefaultSimd(4, vComplex::Nsimd());
std::vector<int> mpi_layout = GridDefaultMpi();
GridCartesian grid(latt_size,simd_layout,mpi_layout);
GridParallelRNG pRNG(&grid);
PhotonR photon(PhotonR::Gauge::Feynman,
PhotonR::ZmScheme::QedL);
EmField a(&grid);
pRNG.SeedRandomDevice();
photon.StochasticField(a, pRNG);
// epilogue // epilogue
LOG(Message) << "Grid is finalizing now" << std::endl; LOG(Message) << "Grid is finalizing now" << std::endl;
Grid_finalize(); Grid_finalize();