1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-10 06:00:45 +01:00

Namespace

This commit is contained in:
paboyle 2018-01-14 21:55:47 +00:00
parent 1dbea9aa69
commit 0d749becff

View File

@ -28,15 +28,13 @@ directory
/* END LEGAL */ /* END LEGAL */
#ifndef SCALAR_OBJS_H #ifndef SCALAR_OBJS_H
#define SCALAR_OBJS_H #define SCALAR_OBJS_H
namespace Grid {
// FIXME drop the QCD namespace in Nd NAMESPACE_BEGIN(Grid);
// Scalar field obs // Scalar field obs
template <class Impl> template <class Impl>
class ScalarObs { class ScalarObs {
public: public:
////////////////////////////////////////////////// //////////////////////////////////////////////////
// squared field // squared field
////////////////////////////////////////////////// //////////////////////////////////////////////////
@ -61,7 +59,7 @@ class ScalarObs {
static void phider(typename Impl::Field &fsq, static void phider(typename Impl::Field &fsq,
const typename Impl::Field &f) { const typename Impl::Field &f) {
fsq = Cshift(f, 0, -1) * f; fsq = Cshift(f, 0, -1) * f;
for (int mu = 1; mu < QCD::Nd; mu++) fsq += Cshift(f, mu, -1) * f; for (int mu = 1; mu < Nd; mu++) fsq += Cshift(f, mu, -1) * f;
} }
////////////////////////////////////////////////// //////////////////////////////////////////////////
@ -71,7 +69,7 @@ class ScalarObs {
static RealD sumphider(const typename Impl::Field &f) { static RealD sumphider(const typename Impl::Field &f) {
typename Impl::Field tmp(f._grid); typename Impl::Field tmp(f._grid);
tmp = Cshift(f, 0, -1) * f; tmp = Cshift(f, 0, -1) * f;
for (int mu = 1; mu < QCD::Nd; mu++) { for (int mu = 1; mu < Nd; mu++) {
tmp += Cshift(f, mu, -1) * f; tmp += Cshift(f, mu, -1) * f;
} }
return -sum(trace(tmp)); return -sum(trace(tmp));
@ -90,7 +88,6 @@ class ScalarObs {
} }
}; };
NAMESPACE_END(Grid);
}
#endif #endif