mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Code cleaning and addition of Weak Hamiltonian contraction log message
This commit is contained in:
parent
d6a7d7d1e0
commit
4a45c06dd7
@ -88,6 +88,11 @@ void TWeakHamiltonianEye::setup(void)
|
|||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
void TWeakHamiltonianEye::execute(void)
|
void TWeakHamiltonianEye::execute(void)
|
||||||
{
|
{
|
||||||
|
LOG(Message) << "Computing Weak Hamiltonian (Eye type) contractions '"
|
||||||
|
<< getName() << "' using quarks '" << par().q1 << "', '"
|
||||||
|
<< par().q2 << ", '" << par().q3 << "' and '" << par().q4
|
||||||
|
<< "'." << std::endl;
|
||||||
|
|
||||||
XmlWriter writer(par().output);
|
XmlWriter writer(par().output);
|
||||||
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
||||||
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
||||||
@ -106,22 +111,13 @@ void TWeakHamiltonianEye::execute(void)
|
|||||||
std::vector<LatticeComplex> E_body(ndim, tmp2);
|
std::vector<LatticeComplex> E_body(ndim, tmp2);
|
||||||
std::vector<LatticeComplex> E_loop(ndim, tmp2);
|
std::vector<LatticeComplex> E_loop(ndim, tmp2);
|
||||||
|
|
||||||
std::vector<std::vector<Gamma>> gL = {{Gamma(Gamma::Algebra::GammaX),
|
|
||||||
Gamma(Gamma::Algebra::GammaY),
|
|
||||||
Gamma(Gamma::Algebra::GammaZ),
|
|
||||||
Gamma(Gamma::Algebra::GammaT)},
|
|
||||||
{Gamma(Gamma::Algebra::GammaXGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaYGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaZGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaTGamma5)}};
|
|
||||||
|
|
||||||
// Setup for S-type contractions.
|
// Setup for S-type contractions.
|
||||||
for (int mu = 0; mu < ndim; ++mu)
|
for (int mu = 0; mu < ndim; ++mu)
|
||||||
{
|
{
|
||||||
S_body[mu] = MAKE_SE_BODY(q1, q2, q3, gL[i_V][mu]) -
|
S_body[mu] = MAKE_SE_BODY(q1, q2, q3, Gamma::gmu[mu]) -
|
||||||
MAKE_SE_BODY(q1, q2, q3, gL[i_A][mu]);
|
MAKE_SE_BODY(q1, q2, q3, Gamma::gmu[mu]*g5);
|
||||||
S_loop[mu] = MAKE_SE_LOOP(q4, gL[i_V][mu]) -
|
S_loop[mu] = MAKE_SE_LOOP(q4, Gamma::gmu[mu]) -
|
||||||
MAKE_SE_LOOP(q4, gL[i_A][mu]);
|
MAKE_SE_LOOP(q4, Gamma::gmu[mu]*g5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform S-type contractions.
|
// Perform S-type contractions.
|
||||||
|
@ -45,7 +45,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Saucer and Eye subdiagram contractions.
|
// Saucer and Eye subdiagram contractions.
|
||||||
#define MAKE_SE_BODY(Q_1, Q_2, Q_3, gamma) (Q_3*g5*Q_1*adj(Q_2)*g5*gamma)
|
#define MAKE_SE_BODY(Q_1, Q_2, Q_3, gamma) (Q_3*g5*Q_1*adj(Q_2)*(g5*gamma))
|
||||||
#define MAKE_SE_LOOP(Q_loop, gamma) (Q_loop*gamma)
|
#define MAKE_SE_LOOP(Q_loop, gamma) (Q_loop*gamma)
|
||||||
|
|
||||||
class TWeakHamiltonianEye: public Module<WeakHamiltonianPar>
|
class TWeakHamiltonianEye: public Module<WeakHamiltonianPar>
|
||||||
|
@ -90,6 +90,11 @@ void TWeakHamiltonianNonEye::setup(void)
|
|||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
void TWeakHamiltonianNonEye::execute(void)
|
void TWeakHamiltonianNonEye::execute(void)
|
||||||
{
|
{
|
||||||
|
LOG(Message) << "Computing Weak Hamiltonian (Non-Eye type) contractions '"
|
||||||
|
<< getName() << "' using quarks '" << par().q1 << "', '"
|
||||||
|
<< par().q2 << ", '" << par().q3 << "' and '" << par().q4
|
||||||
|
<< "'." << std::endl;
|
||||||
|
|
||||||
XmlWriter writer(par().output);
|
XmlWriter writer(par().output);
|
||||||
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
||||||
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
||||||
@ -108,22 +113,13 @@ void TWeakHamiltonianNonEye::execute(void)
|
|||||||
std::vector<LatticeComplex> W_i_side_loop(ndim, tmp2);
|
std::vector<LatticeComplex> W_i_side_loop(ndim, tmp2);
|
||||||
std::vector<LatticeComplex> W_f_side_loop(ndim, tmp2);
|
std::vector<LatticeComplex> W_f_side_loop(ndim, tmp2);
|
||||||
|
|
||||||
std::vector<std::vector<Gamma>> gL = {{Gamma(Gamma::Algebra::GammaX),
|
|
||||||
Gamma(Gamma::Algebra::GammaY),
|
|
||||||
Gamma(Gamma::Algebra::GammaZ),
|
|
||||||
Gamma(Gamma::Algebra::GammaT)},
|
|
||||||
{Gamma(Gamma::Algebra::GammaXGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaYGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaZGamma5),
|
|
||||||
Gamma(Gamma::Algebra::GammaTGamma5)}};
|
|
||||||
|
|
||||||
// Setup for C-type contractions.
|
// Setup for C-type contractions.
|
||||||
for (int mu = 0; mu < ndim; ++mu)
|
for (int mu = 0; mu < ndim; ++mu)
|
||||||
{
|
{
|
||||||
C_i_side_loop[mu] = MAKE_CW_SUBDIAG(q1, q2, gL[i_V][mu]) -
|
C_i_side_loop[mu] = MAKE_CW_SUBDIAG(q1, q2, Gamma::gmu[mu]) -
|
||||||
MAKE_CW_SUBDIAG(q1, q2, gL[i_A][mu]);
|
MAKE_CW_SUBDIAG(q1, q2, Gamma::gmu[mu]*g5);
|
||||||
C_f_side_loop[mu] = MAKE_CW_SUBDIAG(q3, q4, gL[i_V][mu]) -
|
C_f_side_loop[mu] = MAKE_CW_SUBDIAG(q3, q4, Gamma::gmu[mu]) -
|
||||||
MAKE_CW_SUBDIAG(q3, q4, gL[i_A][mu]);
|
MAKE_CW_SUBDIAG(q3, q4, Gamma::gmu[mu]*g5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform C-type contractions.
|
// Perform C-type contractions.
|
||||||
|
@ -45,7 +45,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Wing and Connected subdiagram contractions
|
// Wing and Connected subdiagram contractions
|
||||||
#define MAKE_CW_SUBDIAG(Q_1, Q_2, gamma) (Q_1*adj(Q_2)*g5*gamma)
|
#define MAKE_CW_SUBDIAG(Q_1, Q_2, gamma) (Q_1*adj(Q_2)*(g5*gamma))
|
||||||
|
|
||||||
class TWeakHamiltonianNonEye: public Module<WeakHamiltonianPar>
|
class TWeakHamiltonianNonEye: public Module<WeakHamiltonianPar>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user