mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 23:37:06 +01:00
Hadrons: Scalar SU(N) utility functions
This commit is contained in:
@ -31,6 +31,7 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#include <Grid/Hadrons/Global.hpp>
|
||||
#include <Grid/Hadrons/Module.hpp>
|
||||
#include <Grid/Hadrons/ModuleFactory.hpp>
|
||||
#include <Grid/Hadrons/Modules/MScalarSUN/Utils.hpp>
|
||||
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
@ -42,7 +43,6 @@ BEGIN_MODULE_NAMESPACE(MScalarSUN)
|
||||
class DivPar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_ENUM(DiffType, undef, forward, 1, backward, 2, central, 3);
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(DivPar,
|
||||
std::vector<std::string>, op,
|
||||
DiffType, type,
|
||||
@ -59,8 +59,8 @@ public:
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(Result,
|
||||
DivPar::DiffType, type,
|
||||
Complex, value);
|
||||
DiffType, type,
|
||||
Complex, value);
|
||||
};
|
||||
public:
|
||||
// constructor
|
||||
@ -135,18 +135,7 @@ void TDiv<SImpl>::execute(void)
|
||||
for (unsigned int mu = 0; mu < nd; ++mu)
|
||||
{
|
||||
auto &op = envGet(ComplexField, par().op[mu]);
|
||||
switch(par().type)
|
||||
{
|
||||
case DivPar::DiffType::backward:
|
||||
div += op - Cshift(op, mu, -1);
|
||||
break;
|
||||
case DivPar::DiffType::forward:
|
||||
div += Cshift(op, mu, 1) - op;
|
||||
break;
|
||||
case DivPar::DiffType::central:
|
||||
div += 0.5*(Cshift(op, mu, 1) - Cshift(op, mu, -1));
|
||||
break;
|
||||
}
|
||||
dmuAcc(div, op, mu, par().type);
|
||||
}
|
||||
if (!par().output.empty())
|
||||
{
|
||||
|
Reference in New Issue
Block a user