13 return Gamma(gamma) * SpinMatrix(Real(1));
20 return GammaDP(gamma) * SpinMatrix(Real(1));
28 XMLReader paramtop(xml, path);
32 read(paramtop,
"Op", param.
op);
69 std::vector<MatrixSpinRep_t>
out;
71 for(
int sl = 0; sl < Ns; ++sl)
73 for(
int sr = 0; sr < Ns; ++sr)
75 Complex ss = peekSpin(
in, sl, sr);
76 Real dd = localNorm2(ss);
78 if (toBool(dd > Real(0.0)))
126 obj.op *= Real(lfac * rfac);
132 std::vector<MatrixSpinRep_t>
foldSourceDP(
const std::vector<MatrixSpinRep_t>& spin,
bool src)
134 std::vector<MatrixSpinRep_t>
obj;
136 for(
int aks = 0; aks < spin.size(); ++aks)
149 XMLReader paramtop(xml, path);
154 read(paramtop,
"Op", param.
op);
194 std::vector<Rank3SpinRep_t>
out;
196 if ((
in.size1() != Ns) || (
in.size2() != Ns) || (
in.size3() != Ns))
198 std::cerr << __func__ <<
": input has unexpected size\n";
202 for(
int sl = 0; sl < Ns; ++sl)
204 for(
int sm = 0; sm < Ns; ++sm)
206 for(
int sr = 0; sr < Ns; ++sr)
208 Complex ss =
in(sl+1,sm+1,sr+1);
209 Real dd = localNorm2(ss);
212 if (toBool(dd > Real(1.0e-15)))
252 obj.op *= Real(lfac * mfac * rfac);
258 std::vector<Rank3SpinRep_t>
foldSourceDP(
const std::vector<Rank3SpinRep_t>& spin,
bool src)
260 std::vector<Rank3SpinRep_t>
obj;
262 for(
int aks = 0; aks < spin.size(); ++aks)
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
Handle< MapObject< int, EVPair< LatticeColorVector > > > obj
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
SpinMatrix constructSpinDR(int gamma)
Construct a spin matrix in the DR rep.
SpinMatrix constructSpinDP(int gamma)
Construct a spin matrix in the DP rep.
std::vector< MatrixSpinRep_t > convertTwoQuarkSpinDP(int gamma)
Convert a DP gamma matrix indexed by gamma into a sparse spin representation.
std::vector< MatrixSpinRep_t > convertTwoQuarkSpin(const SpinMatrix &in)
Convert a generic spin matrix into a sparse spin representation.
MatrixSpinRep_t foldSourceDP(const MatrixSpinRep_t &spin, bool src)
Fold in gamma_4 for source ops.
std::vector< Rank3SpinRep_t > convertThreeQuarkSpin(const Array3dO< Complex > &in)
Convert a generic spin tensor into a sparse spin representation.
std::vector< MatrixSpinRep_t > convertTwoQuarkSpinDR(int gamma)
Convert a DR gamma matrix indexed by gamma into a sparse spin representation.
static QDP_ColorVector * out
Constructor.
static QDP_ColorVector * in
Sparse matrix representation of spin matrices.
The sparse representation of a spin matrix.
The sparse representation of a spin rank-3 tensor.