mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Improvements to sequential conserved current test and small bugfix.
This commit is contained in:
parent
eec79e0a1e
commit
622a21bec6
@ -140,7 +140,8 @@ void TTestSeqConserved<FImpl>::execute(void)
|
|||||||
Gamma g(gA);
|
Gamma g(gA);
|
||||||
SitePropagator qSite;
|
SitePropagator qSite;
|
||||||
Complex test_S, test_V, check_S, check_V;
|
Complex test_S, test_V, check_S, check_V;
|
||||||
std::vector<SitePropagator> check_buf;
|
std::vector<TComplex> check_buf;
|
||||||
|
LatticeComplex c(env().getGrid());
|
||||||
|
|
||||||
// Check sequential insertion of current gives same result as conserved
|
// Check sequential insertion of current gives same result as conserved
|
||||||
// current sink upon contraction. Assume q uses a point source.
|
// current sink upon contraction. Assume q uses a point source.
|
||||||
@ -151,9 +152,14 @@ void TTestSeqConserved<FImpl>::execute(void)
|
|||||||
test_V = trace(qSite*g*Gamma::gmu[par().mu]);
|
test_V = trace(qSite*g*Gamma::gmu[par().mu]);
|
||||||
|
|
||||||
act.ContractConservedCurrent(q, q, tmp, par().curr, par().mu);
|
act.ContractConservedCurrent(q, q, tmp, par().curr, par().mu);
|
||||||
sliceSum(tmp, check_buf, Tp);
|
|
||||||
check_S = TensorRemove(trace(check_buf[par().t_J]*g));
|
c = trace(tmp*g);
|
||||||
check_V = TensorRemove(trace(check_buf[par().t_J]*g*Gamma::gmu[par().mu]));
|
sliceSum(c, check_buf, Tp);
|
||||||
|
check_S = TensorRemove(check_buf[par().t_J]);
|
||||||
|
|
||||||
|
c = trace(tmp*g*Gamma::gmu[par().mu]);
|
||||||
|
sliceSum(c, check_buf, Tp);
|
||||||
|
check_V = TensorRemove(check_buf[par().t_J]);
|
||||||
|
|
||||||
LOG(Message) << "Test S = " << abs(test_S) << std::endl;
|
LOG(Message) << "Test S = " << abs(test_S) << std::endl;
|
||||||
LOG(Message) << "Test V = " << abs(test_V) << std::endl;
|
LOG(Message) << "Test V = " << abs(test_V) << std::endl;
|
||||||
@ -166,8 +172,8 @@ void TTestSeqConserved<FImpl>::execute(void)
|
|||||||
|
|
||||||
LOG(Message) << "Consistency check for sequential conserved "
|
LOG(Message) << "Consistency check for sequential conserved "
|
||||||
<< par().curr << " current insertion: " << std::endl;
|
<< par().curr << " current insertion: " << std::endl;
|
||||||
LOG(Message) << "Check S = " << abs(check_S) << std::endl;
|
LOG(Message) << "Diff S = " << abs(check_S) << std::endl;
|
||||||
LOG(Message) << "Check V = " << abs(check_V) << std::endl;
|
LOG(Message) << "Diff V = " << abs(check_V) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
END_MODULE_NAMESPACE
|
END_MODULE_NAMESPACE
|
||||||
|
@ -327,6 +327,7 @@ void WilsonKernels<Impl>::SeqConservedCurrentInternal(const PropagatorField &q_i
|
|||||||
GaugeLinkField Umu(U._grid);
|
GaugeLinkField Umu(U._grid);
|
||||||
Umu = PeekIndex<LorentzIndex>(U, mu);
|
Umu = PeekIndex<LorentzIndex>(U, mu);
|
||||||
Lattice<iScalar<vInteger>> t(q_in._grid);
|
Lattice<iScalar<vInteger>> t(q_in._grid);
|
||||||
|
LatticeCoordinate(t, mu);
|
||||||
|
|
||||||
tmp = this->CovShiftForward(Umu, mu, q_in)*ph;
|
tmp = this->CovShiftForward(Umu, mu, q_in)*ph;
|
||||||
tmp = where((t >= tmin) and (t <= tmax), tmp, 0.*tmp);
|
tmp = where((t >= tmin) and (t <= tmax), tmp, 0.*tmp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user