mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Hadrons: Schur convention globally defined through a macro
This commit is contained in:
@ -60,10 +60,10 @@ class TLocalCoherenceLanczos: public Module<LocalCoherenceLanczosPar>
|
||||
{
|
||||
public:
|
||||
FERM_TYPE_ALIASES(FImpl,);
|
||||
typedef LCL<FImpl, nBasis> LCL;
|
||||
typedef FineEigenPack<FImpl> FineEigenPack;
|
||||
typedef CoarseEigenPack<FImpl, nBasis> CoarseEigenPack;
|
||||
typedef SchurDiagMooeeOperator<FMat, FermionField> SchurFMat;
|
||||
typedef LCL<FImpl, nBasis> LCL;
|
||||
typedef FineEigenPack<FImpl> FineEigenPack;
|
||||
typedef CoarseEigenPack<FImpl, nBasis> CoarseEigenPack;
|
||||
typedef HADRONS_DEFAULT_SCHUR_OP<FMat, FermionField> SchurFMat;
|
||||
public:
|
||||
// constructor
|
||||
TLocalCoherenceLanczos(const std::string name);
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user