1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-27 22:25:56 +01:00

Namespace

This commit is contained in:
paboyle 2018-01-14 22:16:33 +00:00
parent 049b4a4631
commit 361ce948c3

View File

@ -1,23 +1,22 @@
/* /*
* Policy classes for the HMC * Policy classes for the HMC
* Author: Guido Cossu * Author: Guido Cossu
*/ */
#ifndef ADJOINT_H #ifndef ADJOINT_H
#define ADJOINT_H #define ADJOINT_H
namespace Grid { NAMESPACE_BEGIN(Grid);
namespace QCD {
/* /*
* This is an helper class for the HMC * This is an helper class for the HMC
* Should contain only the data for the adjoint representation * Should contain only the data for the adjoint representation
* and the facility to convert from the fundamental -> adjoint * and the facility to convert from the fundamental -> adjoint
*/ */
template <int ncolour> template <int ncolour>
class AdjointRep { class AdjointRep {
public: public:
// typdef to be used by the Representations class in HMC to get the // typdef to be used by the Representations class in HMC to get the
// types for the higher representation fields // types for the higher representation fields
typedef typename SU_Adjoint<ncolour>::LatticeAdjMatrix LatticeMatrix; typedef typename SU_Adjoint<ncolour>::LatticeAdjMatrix LatticeMatrix;
@ -95,7 +94,7 @@ class AdjointRep {
return out; return out;
} }
private: private:
void projectOnAlgebra(typename SU<ncolour>::LatticeAlgebraVector &h_out, void projectOnAlgebra(typename SU<ncolour>::LatticeAlgebraVector &h_out,
const LatticeMatrix &in, Real scale = 1.0) const { const LatticeMatrix &in, Real scale = 1.0) const {
SU_Adjoint<ncolour>::projectOnAlgebra(h_out, in, scale); SU_Adjoint<ncolour>::projectOnAlgebra(h_out, in, scale);
@ -109,7 +108,7 @@ class AdjointRep {
}; };
typedef AdjointRep<Nc> AdjointRepresentation; typedef AdjointRep<Nc> AdjointRepresentation;
}
} NAMESPACE_END(Grid);
#endif #endif