1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-19 00:07:05 +01:00

Hadrons: Schur convention globally defined through a macro

This commit is contained in:
2018-02-27 18:45:23 +00:00
parent 4828226095
commit 16ebbfff29
3 changed files with 24 additions and 9 deletions

View File

@ -43,9 +43,10 @@ BEGIN_MODULE_NAMESPACE(MSolver)
class RBPrecCGPar: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(RBPrecCGPar,
std::string, action,
double , residual);
GRID_SERIALIZABLE_CLASS_MEMBERS(RBPrecCGPar ,
std::string , action,
unsigned int , maxIteration,
double , residual);
};
template <typename FImpl>
@ -117,14 +118,16 @@ void TRBPrecCG<FImpl>::setup(void)
auto &mat = envGet(FMat, par().action);
auto solver = [&mat, this](FermionField &sol, const FermionField &source)
{
ConjugateGradient<FermionField> cg(par().residual, 10000);
SchurRedBlackDiagMooeeSolve<FermionField> schurSolver(cg);
ConjugateGradient<FermionField> cg(par().residual,
par().maxIteration);
HADRONS_DEFAULT_SCHUR_SOLVE<FermionField> schurSolver(cg);
schurSolver(mat, source, sol);
};
envCreate(SolverFn, getName(), Ls, solver);
}
// execution ///////////////////////////////////////////////////////////////////
template <typename FImpl>
void TRBPrecCG<FImpl>::execute(void)