mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-25 13:15:55 +01:00
Zero changes (literally) and also a warning elimination
This commit is contained in:
parent
f574c20118
commit
d557f3ef77
@ -40,7 +40,7 @@ HadronsLogger Hadrons::HadronsLogIterative(1,"Iterative");
|
|||||||
HadronsLogger Hadrons::HadronsLogDebug(1,"Debug");
|
HadronsLogger Hadrons::HadronsLogDebug(1,"Debug");
|
||||||
|
|
||||||
// type utilities //////////////////////////////////////////////////////////////
|
// type utilities //////////////////////////////////////////////////////////////
|
||||||
constexpr unsigned int maxNameSize = 1024u;
|
//constexpr unsigned int maxNameSize = 1024u;
|
||||||
|
|
||||||
std::string Hadrons::typeName(const std::type_info *info)
|
std::string Hadrons::typeName(const std::type_info *info)
|
||||||
{
|
{
|
||||||
|
@ -145,7 +145,7 @@ void TWardIdentity<FImpl>::execute(void)
|
|||||||
// Compute D_mu V_mu, D here is backward derivative.
|
// Compute D_mu V_mu, D here is backward derivative.
|
||||||
envGetTmp(PropagatorField, tmp);
|
envGetTmp(PropagatorField, tmp);
|
||||||
envGetTmp(PropagatorField, vector_WI);
|
envGetTmp(PropagatorField, vector_WI);
|
||||||
vector_WI = zero;
|
vector_WI = Zero();
|
||||||
for (unsigned int mu = 0; mu < Nd; ++mu)
|
for (unsigned int mu = 0; mu < Nd; ++mu)
|
||||||
{
|
{
|
||||||
act.ContractConservedCurrent(q, q, tmp, Current::Vector, mu);
|
act.ContractConservedCurrent(q, q, tmp, Current::Vector, mu);
|
||||||
@ -166,7 +166,7 @@ void TWardIdentity<FImpl>::execute(void)
|
|||||||
std::vector<TComplex> axial_buf;
|
std::vector<TComplex> axial_buf;
|
||||||
|
|
||||||
// Compute <P|D_mu A_mu>, D is backwards derivative.
|
// Compute <P|D_mu A_mu>, D is backwards derivative.
|
||||||
axial_defect = zero;
|
axial_defect = Zero();
|
||||||
for (unsigned int mu = 0; mu < Nd; ++mu)
|
for (unsigned int mu = 0; mu < Nd; ++mu)
|
||||||
{
|
{
|
||||||
act.ContractConservedCurrent(q, q, tmp, Current::Axial, mu);
|
act.ContractConservedCurrent(q, q, tmp, Current::Axial, mu);
|
||||||
@ -174,8 +174,8 @@ void TWardIdentity<FImpl>::execute(void)
|
|||||||
axial_defect += trace(g5*tmp);
|
axial_defect += trace(g5*tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get <P|J5q> for 5D (zero for 4D) and <P|P>.
|
// Get <P|J5q> for 5D (Zero() for 4D) and <P|P>.
|
||||||
PJ5q = zero;
|
PJ5q = Zero();
|
||||||
if (Ls_ > 1)
|
if (Ls_ > 1)
|
||||||
{
|
{
|
||||||
// <P|P>
|
// <P|P>
|
||||||
|
@ -55,7 +55,7 @@ for (unsigned int t = 0; t < buf.size(); ++t)\
|
|||||||
|
|
||||||
//// Contraction of mu index: use 'mu' variable in exp.
|
//// Contraction of mu index: use 'mu' variable in exp.
|
||||||
#define SUM_MU(buf,exp)\
|
#define SUM_MU(buf,exp)\
|
||||||
buf = zero;\
|
buf = Zero(); \
|
||||||
for (unsigned int mu = 0; mu < ndim; ++mu)\
|
for (unsigned int mu = 0; mu < ndim; ++mu)\
|
||||||
{\
|
{\
|
||||||
buf += exp;\
|
buf += exp;\
|
||||||
|
@ -52,7 +52,7 @@ inline void make_4D(Lattice<vobj> &in_5d, Lattice<vobj> &out_4d, int Ls)
|
|||||||
template<class vobj>
|
template<class vobj>
|
||||||
inline void make_5D(Lattice<vobj> &in_4d, Lattice<vobj> &out_5d, int Ls)
|
inline void make_5D(Lattice<vobj> &in_4d, Lattice<vobj> &out_5d, int Ls)
|
||||||
{
|
{
|
||||||
out_5d = zero;
|
out_5d = Zero();
|
||||||
InsertSlice(in_4d, out_5d, 0, 0);
|
InsertSlice(in_4d, out_5d, 0, 0);
|
||||||
InsertSlice(in_4d, out_5d, Ls-1, 0);
|
InsertSlice(in_4d, out_5d, Ls-1, 0);
|
||||||
axpby_ssp_pplus(out_5d, 0., out_5d, 1., out_5d, 0, 0);
|
axpby_ssp_pplus(out_5d, 0., out_5d, 1., out_5d, 0, 0);
|
||||||
@ -185,7 +185,7 @@ void TGaugeProp<FImpl>::execute(void)
|
|||||||
PropToFerm(source, fullSrc, s, c);
|
PropToFerm(source, fullSrc, s, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sol = zero;
|
sol = Zero();
|
||||||
solver(sol, source);
|
solver(sol, source);
|
||||||
FermToProp(prop, sol, s, c);
|
FermToProp(prop, sol, s, c);
|
||||||
// create 4D propagators from 5D one if necessary
|
// create 4D propagators from 5D one if necessary
|
||||||
|
@ -168,7 +168,7 @@ void TChargedProp::momD1(ScalarField &s, FFT &fft)
|
|||||||
envGetTmp(ScalarField, result);
|
envGetTmp(ScalarField, result);
|
||||||
envGetTmp(ScalarField, Amu);
|
envGetTmp(ScalarField, Amu);
|
||||||
|
|
||||||
result = zero;
|
result = Zero();
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
{
|
{
|
||||||
Amu = peekLorentz(A, mu);
|
Amu = peekLorentz(A, mu);
|
||||||
@ -198,7 +198,7 @@ void TChargedProp::momD2(ScalarField &s, FFT &fft)
|
|||||||
envGetTmp(ScalarField, result);
|
envGetTmp(ScalarField, result);
|
||||||
envGetTmp(ScalarField, Amu);
|
envGetTmp(ScalarField, Amu);
|
||||||
|
|
||||||
result = zero;
|
result = Zero();
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
{
|
{
|
||||||
Amu = peekLorentz(A, mu);
|
Amu = peekLorentz(A, mu);
|
||||||
|
@ -126,7 +126,7 @@ void TPoint<FImpl>::execute(void)
|
|||||||
|
|
||||||
envGetTmp(LatticeComplex, coor);
|
envGetTmp(LatticeComplex, coor);
|
||||||
p = strToVec<Real>(par().mom);
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = Zero();
|
||||||
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
LatticeCoordinate(coor, mu);
|
LatticeCoordinate(coor, mu);
|
||||||
|
@ -127,7 +127,7 @@ void TPoint<FImpl>::execute(void)
|
|||||||
SitePropagator id;
|
SitePropagator id;
|
||||||
|
|
||||||
id = 1.;
|
id = 1.;
|
||||||
src = zero;
|
src = Zero();
|
||||||
pokeSite(id, src, position);
|
pokeSite(id, src, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ void TSeqGamma<FImpl>::execute(void)
|
|||||||
|
|
||||||
envGetTmp(LatticeComplex, coor);
|
envGetTmp(LatticeComplex, coor);
|
||||||
p = strToVec<Real>(par().mom);
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = Zero();
|
||||||
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
LatticeCoordinate(coor, mu);
|
LatticeCoordinate(coor, mu);
|
||||||
|
@ -138,7 +138,7 @@ void TWall<FImpl>::execute(void)
|
|||||||
|
|
||||||
envGetTmp(LatticeComplex, coor);
|
envGetTmp(LatticeComplex, coor);
|
||||||
p = strToVec<Real>(par().mom);
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = Zero();
|
||||||
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
LatticeCoordinate(coor, mu);
|
LatticeCoordinate(coor, mu);
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
static void sitePlaquette(LatticeComplex &Plaq,
|
static void sitePlaquette(LatticeComplex &Plaq,
|
||||||
const std::vector<GaugeMat> &U) {
|
const std::vector<GaugeMat> &U) {
|
||||||
LatticeComplex sitePlaq(U[0].Grid());
|
LatticeComplex sitePlaq(U[0].Grid());
|
||||||
Plaq = zero;
|
Plaq = Zero();
|
||||||
for (int mu = 1; mu < U[0].Grid()->_ndimension; mu++) {
|
for (int mu = 1; mu < U[0].Grid()->_ndimension; mu++) {
|
||||||
for (int nu = 0; nu < mu; nu++) {
|
for (int nu = 0; nu < mu; nu++) {
|
||||||
traceDirPlaquette(sitePlaq, U, mu, nu);
|
traceDirPlaquette(sitePlaq, U, mu, nu);
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
const std::vector<GaugeMat> &U,
|
const std::vector<GaugeMat> &U,
|
||||||
const int R1, const int R2) {
|
const int R1, const int R2) {
|
||||||
LatticeComplex siteWl(U[0].Grid());
|
LatticeComplex siteWl(U[0].Grid());
|
||||||
Wl = zero;
|
Wl = Zero();
|
||||||
for (int mu = 1; mu < U[0].Grid()->_ndimension; mu++) {
|
for (int mu = 1; mu < U[0].Grid()->_ndimension; mu++) {
|
||||||
for (int nu = 0; nu < mu; nu++) {
|
for (int nu = 0; nu < mu; nu++) {
|
||||||
traceWilsonLoop(siteWl, U, R1, R2, mu, nu);
|
traceWilsonLoop(siteWl, U, R1, R2, mu, nu);
|
||||||
@ -144,7 +144,7 @@ public:
|
|||||||
|
|
||||||
int ndim = U[0].Grid()->_ndimension;
|
int ndim = U[0].Grid()->_ndimension;
|
||||||
|
|
||||||
Wl = zero;
|
Wl = Zero();
|
||||||
for (int nu = 0; nu < ndim - 1; nu++) {
|
for (int nu = 0; nu < ndim - 1; nu++) {
|
||||||
traceWilsonLoop(siteWl, U, R1, R2, ndim-1, nu);
|
traceWilsonLoop(siteWl, U, R1, R2, ndim-1, nu);
|
||||||
Wl = Wl + siteWl;
|
Wl = Wl + siteWl;
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
const int R1, const int R2) {
|
const int R1, const int R2) {
|
||||||
LatticeComplex siteWl(U[0].Grid());
|
LatticeComplex siteWl(U[0].Grid());
|
||||||
|
|
||||||
Wl = zero;
|
Wl = Zero();
|
||||||
for (int mu = 1; mu < U[0].Grid()->_ndimension - 1; mu++) {
|
for (int mu = 1; mu < U[0].Grid()->_ndimension - 1; mu++) {
|
||||||
for (int nu = 0; nu < mu; nu++) {
|
for (int nu = 0; nu < mu; nu++) {
|
||||||
traceWilsonLoop(siteWl, U, R1, R2, mu, nu);
|
traceWilsonLoop(siteWl, U, R1, R2, mu, nu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user