1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 23:37:06 +01:00

Hadrons: scalar SU(N) result handling improvement

This commit is contained in:
2018-04-26 17:32:37 +01:00
parent cc6eb51e3e
commit d47484717e
9 changed files with 156 additions and 124 deletions

View File

@ -51,20 +51,20 @@ public:
std::string, output);
};
class ShiftProbeResult: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(ShiftProbeResult,
std::string, shifts,
Complex, value);
};
template <typename SImpl>
class TShiftProbe: public Module<ShiftProbePar>
{
public:
typedef typename SImpl::Field Field;
typedef typename SImpl::ComplexField ComplexField;
class Result: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(Result,
std::string, op,
Complex , value);
};
public:
// constructor
TShiftProbe(const std::string name);
@ -160,6 +160,14 @@ void TShiftProbe<SImpl>::execute(void)
}
}
probe = real(sign*trace(acc));
if (!par().output.empty())
{
ShiftProbeResult r;
r.shifts = par().shifts;
r.value = TensorRemove(sum(probe));
saveResult(par().output, "probe", r);
}
}
END_MODULE_NAMESPACE