diff --git a/extras/Hadrons/A2AVectors.hpp b/extras/Hadrons/A2AVectors.hpp index 69440781..4cbc7f2a 100644 --- a/extras/Hadrons/A2AVectors.hpp +++ b/extras/Hadrons/A2AVectors.hpp @@ -35,10 +35,9 @@ See the full license in the file "LICENSE" in the top level distribution directo BEGIN_HADRONS_NAMESPACE -//////////////////////////////// -// A2A Modes -//////////////////////////////// - +/****************************************************************************** + * Classes to generate V & W all-to-all vectors * + ******************************************************************************/ template class A2AVectorsSchurDiagTwo { @@ -48,14 +47,20 @@ public: public: A2AVectorsSchurDiagTwo(FMat &action, Solver &solver); virtual ~A2AVectorsSchurDiagTwo(void) = default; - void makeLowModeV(FermionField &vout, const FermionField &evec, const Real &eval); - void makeLowModeV5D(FermionField &vout_4d, FermionField &vout_5d, const FermionField &evec, const Real &eval); - void makeLowModeW(FermionField &wout, const FermionField &evec, const Real &eval); - void makeLowModeW5D(FermionField &wout_4d, FermionField &wout_5d, const FermionField &evec, const Real &eval); + void makeLowModeV(FermionField &vout, + const FermionField &evec, const Real &eval); + void makeLowModeV5D(FermionField &vout_4d, FermionField &vout_5d, + const FermionField &evec, const Real &eval); + void makeLowModeW(FermionField &wout, + const FermionField &evec, const Real &eval); + void makeLowModeW5D(FermionField &wout_4d, FermionField &wout_5d, + const FermionField &evec, const Real &eval); void makeHighModeV(FermionField &vout, const FermionField &noise); - void makeHighModeV5D(FermionField &vout_4d, FermionField &vout_5d, const FermionField &noise_5d); + void makeHighModeV5D(FermionField &vout_4d, FermionField &vout_5d, + const FermionField &noise_5d); void makeHighModeW(FermionField &wout, const FermionField &noise); - void makeHighModeW5D(FermionField &vout_5d, FermionField &wout_5d, const FermionField &noise_5d); + void makeHighModeW5D(FermionField &vout_5d, FermionField &wout_5d, + const FermionField &noise_5d); private: FMat &action_; Solver &solver_; @@ -65,6 +70,9 @@ private: SchurDiagTwoOperator op_; }; +/****************************************************************************** + * A2AVectorsSchurDiagTwo template implementation * + ******************************************************************************/ template A2AVectorsSchurDiagTwo::A2AVectorsSchurDiagTwo(FMat &action, Solver &solver) : action_(action) @@ -107,7 +115,6 @@ void A2AVectorsSchurDiagTwo::makeLowModeV(FermionField &vout, const Fermi assert(tmp_.checkerboard == Odd); sol_o_ = (1.0 / eval) * tmp_; assert(sol_o_.checkerboard == Odd); - setCheckerboard(vout, sol_e_); assert(sol_e_.checkerboard == Even); setCheckerboard(vout, sol_o_); @@ -145,7 +152,6 @@ void A2AVectorsSchurDiagTwo::makeLowModeW(FermionField &wout, const Fermi ///////////////////////////////////////////////////// op_.Mpc(src_o_, sol_o_); assert(sol_o_.checkerboard == Odd); - setCheckerboard(wout, sol_e_); assert(sol_e_.checkerboard == Even); setCheckerboard(wout, sol_o_); diff --git a/extras/Hadrons/Global.hpp b/extras/Hadrons/Global.hpp index cf96ad9b..3ecf4308 100644 --- a/extras/Hadrons/Global.hpp +++ b/extras/Hadrons/Global.hpp @@ -206,6 +206,9 @@ void makeFileDir(const std::string filename, GridBase *g); #define _HADRONS_SCHUR_SOLVE_(conv) SchurRedBlack##conv##Solve #define HADRONS_SCHUR_SOLVE(conv) _HADRONS_SCHUR_SOLVE_(conv) #define HADRONS_DEFAULT_SCHUR_SOLVE HADRONS_SCHUR_SOLVE(HADRONS_DEFAULT_SCHUR) +#define _HADRONS_SCHUR_A2A_(conv) A2AVectorsSchur##conv +#define HADRONS_SCHUR_A2A(conv) _HADRONS_SCHUR_A2A_(conv) +#define HADRONS_DEFAULT_SCHUR_A2A HADRONS_SCHUR_A2A(HADRONS_DEFAULT_SCHUR) // stringify macro #define _HADRONS_STR(x) #x diff --git a/extras/Hadrons/Modules/MSolver/A2AVectors.hpp b/extras/Hadrons/Modules/MSolver/A2AVectors.hpp index 8a15b781..6c92f99f 100644 --- a/extras/Hadrons/Modules/MSolver/A2AVectors.hpp +++ b/extras/Hadrons/Modules/MSolver/A2AVectors.hpp @@ -60,7 +60,7 @@ class TA2AVectors : public Module public: FERM_TYPE_ALIASES(FImpl,); SOLVER_TYPE_ALIASES(FImpl,); - typedef A2AVectorsSchurDiagTwo A2A; + typedef HADRONS_DEFAULT_SCHUR_A2A A2A; public: // constructor TA2AVectors(const std::string name);