From 618abdf302813e38921c506282d559296dcfd7b5 Mon Sep 17 00:00:00 2001 From: James Harrison Date: Sat, 29 Oct 2016 11:04:02 +0100 Subject: [PATCH] Add missing volume factor in stochastic QED field --- lib/qcd/action/gauge/Photon.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/qcd/action/gauge/Photon.h b/lib/qcd/action/gauge/Photon.h index 0dd5a9dc..409569d8 100644 --- a/lib/qcd/action/gauge/Photon.h +++ b/lib/qcd/action/gauge/Photon.h @@ -151,12 +151,19 @@ namespace QCD{ { auto *grid = dynamic_cast(out._grid); const unsigned int nd = grid->_ndimension; + std::vector latt_size = grid->_fdimensions; GaugeLinkField sqrtK2Inv(grid), r(grid); GaugeField aTilde(grid); FFT fft(grid); + Integer vol = 1; + for(int d = 0; d < nd; d++) + { + vol = vol * latt_size[d]; + } + invKHatSquared(sqrtK2Inv); - sqrtK2Inv = sqrt(real(sqrtK2Inv)); + sqrtK2Inv = sqrt(vol*real(sqrtK2Inv)); zmSub(sqrtK2Inv); for(int mu = 0; mu < nd; mu++) {