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:
@ -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
|
||||
|
Reference in New Issue
Block a user