mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 04:37:05 +01:00
code compiling now - still need to test
This commit is contained in:
@ -146,7 +146,7 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||
std::vector<Gamma::Algebra> ggB = strToVec<Gamma::Algebra>(par().GammaB);
|
||||
Gamma GammaB(ggB[0]);
|
||||
std::vector<TComplex> buf;
|
||||
vTComplex cs;
|
||||
TComplex cs;
|
||||
const int parity {par().parity};
|
||||
const char * quarks_snk{par().quarks_snk.c_str()};
|
||||
const char * quarks_src{par().quarks_src.c_str()};
|
||||
@ -162,11 +162,8 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||
LOG(Message) << "(propagator already sinked)" << std::endl;
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
{
|
||||
//TODO: Get this to compile without the casts. Templates?
|
||||
//BaryonUtils<FIMPL>::ContractBaryons_Sliced(*reinterpret_cast<Grid::iScalar<Grid::iMatrix<Grid::iMatrix<Grid::vComplex, 3>, 4>>*>(&q1_src[t]),*reinterpret_cast<Grid::iScalar<Grid::iMatrix<Grid::iMatrix<Grid::vComplex, 3>, 4>>*>(&q2_src[t]),*reinterpret_cast<Grid::iScalar<Grid::iMatrix<Grid::iMatrix<Grid::vComplex, 3>, 4>>*>(&q3_src[t]),GammaA,GammaB,quarks_snk,quarks_src,parity,cs);
|
||||
//result.corr[t] = TensorRemove(*reinterpret_cast<Grid::TComplex*>(&cs));
|
||||
// BaryonUtils<FIMPL>::ContractBaryons_Sliced(q1_src[t],q2_src[t],q3_src[t],GammaA,GammaB,quarks_snk,quarks_src,parity,cs);
|
||||
// result.corr[t] = TensorRemove(cs);
|
||||
BaryonUtils<FIMPL>::ContractBaryons_Sliced(q1_src[t],q2_src[t],q3_src[t],GammaA,GammaB,quarks_snk,quarks_src,parity,cs);
|
||||
result.corr[t] = TensorRemove(cs);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -176,21 +173,14 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||
ns = vm().getModuleNamespace(env().getObjectModule(par().sink));
|
||||
if (ns == "MSource")
|
||||
{
|
||||
//TODO: Understand what this is and then get it to compile. Hopefully no new function needed. The following lines are from the Meson.hpp module.
|
||||
/* PropagatorField1 &sink = envGet(PropagatorField1, par().sink);
|
||||
|
||||
c = trace(mesonConnected(q1, q2, gSnk, gSrc)*sink);
|
||||
sliceSum(c, buf, Tp); */
|
||||
// My attempt at some code, which doesn't work. I also don't know whether anything like this is what we want here.
|
||||
/* BaryonUtils<FIMPL>::ContractBaryons(q1_src,q2_src,q3_src,GammaA,GammaB,quarks_snk,quarks_src,parity,c);
|
||||
BaryonUtils<FIMPL>::ContractBaryons(q1_src,q2_src,q3_src,GammaA,GammaB,quarks_snk,quarks_src,parity,c);
|
||||
PropagatorField1 &sink = envGet(PropagatorField1, par().sink);
|
||||
auto test = trace(c*sink);
|
||||
sliceSum(test, buf, Tp); */
|
||||
auto test = closure(trace(sink*c));
|
||||
sliceSum(test, buf, Tp);
|
||||
}
|
||||
else if (ns == "MSink")
|
||||
{
|
||||
BaryonUtils<FIMPL>::ContractBaryons(q1_src,q2_src,q3_src,GammaA,GammaB,quarks_snk,quarks_src,parity,c);
|
||||
|
||||
SinkFnScalar &sink = envGet(SinkFnScalar, par().sink);
|
||||
buf = sink(c);
|
||||
}
|
||||
|
Reference in New Issue
Block a user