6 #ifndef __syssolver_linop_richardson_multiprec_h__
7 #define __syssolver_linop_richardson_multiprec_h__
29 namespace LinOpSysSolverRichardsonCloverEnv
45 typedef LatticeFermion
T;
46 typedef LatticeColorMatrix
U;
47 typedef multi1d<LatticeColorMatrix>
Q;
49 typedef LatticeFermionF
TF;
50 typedef LatticeColorMatrixF
UF;
51 typedef multi1d<LatticeColorMatrixF>
QF;
53 typedef LatticeFermionD
TD;
54 typedef LatticeColorMatrixD
UD;
55 typedef multi1d<LatticeColorMatrixD>
QD;
69 QF links_single; links_single.resize(
Nd);
70 QD links_double; links_double.resize(
Nd);
72 const Q& links = state_->getLinks();
74 links_single[
mu] = links[
mu];
75 links_double[
mu] = links[
mu];
90 XMLReader paramtop(is);
104 const Subset&
subset()
const {
return A->subset();}
140 double time = swatch.getTimeInSeconds();
147 r[
A->subset()] -=
tmp;
148 res.
resid = sqrt(norm2(
r,
A->subset())/norm2(
chi,
A->subset()));
150 QDPIO::cout <<
"MULTIPREC_RICHARDSON_SOLVER: " << res.
n_count <<
" iterations. Rsd = " << res.
resid <<
" Relative Rsd = " << res.
resid/sqrt(norm2(
chi,
A->subset())) << std::endl;
151 QDPIO::cout <<
"MULTIPREC_RICHARDSON_SOLVER_TIME: "<<time<<
" sec" << std::endl;
Even-odd preconditioned Clover-Dirac operator.
Even-odd preconditioned Clover-Dirac operator.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
Solve a system using Richardson iteration.
LinOpSysSolverRichardsonClover(Handle< LinearOperator< T > > A_, Handle< FermState< T, Q, Q > > state_, const SysSolverRichardsonCloverParams &invParam_)
Constructor.
Handle< LinearOperator< T > > A
const Subset & subset() const
Return the subset on which the operator acts.
Handle< LinearOperator< TD > > M_double
multi1d< LatticeColorMatrixD > QD
multi1d< LatticeColorMatrix > Q
Handle< LinOpSystemSolver< TF > > DInv
Handle< FermState< TD, QD, QD > > fstate_double
multi1d< LatticeColorMatrixF > QF
Handle< FermState< TF, QF, QF > > fstate_single
Handle< LinearOperator< TF > > M_single
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solver the linear system.
const SysSolverRichardsonCloverParams invParam
~LinOpSysSolverRichardsonClover()
Destructor is automatic.
LinOpSysSolverRichardsonClover()
SystemSolver disambiguator.
Periodic version of FermState.
Parameters for Clover fermion action.
Even-odd preconditioned Clover fermion linear operator.
Class for counted reference semantics.
M^dag*M composition of a linear operator.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
void InvMultiPrecRichardson(const SystemSolver< LatticeFermionF > &Dinv, const LinearOperator< LatticeFermionD > &D, const LatticeFermionD &b, LatticeFermionD &x, int MaxIter, Real RsdTarget, SystemSolverResults_t &res)
multi1d< LatticeFermion > chi(Ncb)
Periodic ferm state and a creator.
Support class for fermion actions and linear operators.
CloverFermActParams clovParams
GroupXML_t innerSolverParams
Holds return info from SystemSolver call.
Factory for solving M*psi=chi where M is not hermitian or pos. def.
Disambiguator for MdagM system solvers.