6 #ifndef __syssolver_mdagm_cg_lf_clover_h__
7 #define __syssolver_mdagm_cg_lf_clover_h__
29 namespace MdagMSysSolverCGLFCloverEnv
44 typedef LatticeFermion
T;
45 typedef LatticeColorMatrix
U;
46 typedef multi1d<LatticeColorMatrix>
Q;
48 typedef LatticeFermionF
TF;
49 typedef LatticeColorMatrixF
UF;
50 typedef multi1d<LatticeColorMatrixF>
QF;
52 typedef LatticeFermionD
TD;
53 typedef LatticeColorMatrixD
UD;
54 typedef multi1d<LatticeColorMatrixD>
QD;
68 QF links_single; links_single.resize(
Nd);
70 const Q& links = state_->getLinks();
72 links_single[
mu] = links[
mu];
90 const Subset&
subset()
const {
return A->subset();}
126 r[
A->subset()] -= tmp1;
127 res.
resid = sqrt(norm2(
r,
A->subset()));
130 QDPIO::cout <<
"SINGLE_PREC_CLOVER_CG_SOLVER: " << res.
n_count
131 <<
" iterations. Rsd = " << res.
resid
132 <<
" Relative Rsd = " << res.
resid/sqrt(norm2(
chi,
A->subset())) << std::endl;
136 double time = swatch.getTimeInSeconds();
137 QDPIO::cout <<
"SINGLE_PREC_CLOVER_CG_SOLVER_TIME: "<<time<<
" sec" << std::endl;
Abstract interface for a Chronological Solution predictor.
virtual void newVector(const T &psi)=0
Even-odd preconditioned Clover-Dirac operator.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
Solve a system using CG iteration.
Handle< FermState< TF, QF, QF > > fstate_single
const Subset & subset() const
Return the subset on which the operator acts.
multi1d< LatticeColorMatrixF > QF
Handle< LinearOperator< TF > > M_single
MdagMSysSolverCGLFClover(Handle< LinearOperator< T > > A_, Handle< FermState< T, Q, Q > > state_, const SysSolverCGCloverParams &invParam_)
Constructor.
~MdagMSysSolverCGLFClover()
Destructor is automatic.
Handle< LinearOperator< T > > A
MdagMSysSolverCGLFClover()
multi1d< LatticeColorMatrixD > QD
SystemSolverResults_t operator()(T &psi, const T &chi, AbsChronologicalPredictor4D< T > &predictor) const
Solve the linear system starting with a chrono guess.
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solver the linear system.
const SysSolverCGCloverParams invParam
multi1d< LatticeColorMatrix > Q
SystemSolver disambiguator.
Periodic version of FermState.
Parameters for Clover fermion action.
Even-odd preconditioned Clover fermion linear operator.
SystemSolverResults_t InvCG2(const LinearOperator< LatticeFermionF > &M, const LatticeFermionF &chi, LatticeFermionF &psi, const Real &RsdCG, int MaxCG)
Conjugate-Gradient (CGNE) algorithm for a generic Linear Operator.
Class for counted reference semantics.
Conjugate-Gradient algorithm for a generic Linear Operator.
M^dag*M composition of a linear operator.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
multi1d< LatticeFermion > chi(Ncb)
Periodic ferm state and a creator.
Support class for fermion actions and linear operators.
CloverFermActParams clovParams
Holds return info from SystemSolver call.
Disambiguator for MdagM system solvers.
Handle< LinearOperator< T > > MdagM
Factory for producing system solvers for MdagM*psi = chi.