6 #ifndef __syssolver_mdagm_bicgstab_h__
7 #define __syssolver_mdagm_bicgstab_h__
16 #ifdef CHROMA_DO_ONE_CG_RESTART
27 namespace MdagMSysSolverBiCGStabEnv
55 const Subset&
subset()
const {
return A->subset();}
70 swatch.reset(); swatch.start();
83 #ifdef CHROMA_DO_ONE_CG_RESTART
94 re[
A->subset()] -=
chi;
95 res3.
resid = sqrt(norm2(re,
A->subset()));
99 QDPIO::cout <<
"BICGSTAB_SOLVER: " << res3.
n_count
100 <<
" iterations. Rsd = " << res3.
resid
101 <<
" Relative Rsd = " << res3.
resid/sqrt(norm2(
chi,
A->subset())) << std::endl;
103 double time = swatch.getTimeInSeconds();
104 QDPIO::cout <<
"BICGSTAB_SOLVER_TIME: "<<time<<
" sec" << std::endl;
127 swatch.reset(); swatch.start();
149 catch(std::bad_cast) {
173 #ifdef CHROMA_DO_ONE_CG_RESTART
185 re[
A->subset()] -=
chi;
186 res3.
resid = sqrt(norm2(re,
A->subset()));
190 QDPIO::cout <<
"BICGSTAB_SOLVER: " << res3.
n_count
191 <<
" iterations. Rsd = " << res3.
resid
192 <<
" Relative Rsd = " << res3.
resid/sqrt(norm2(
chi,
A->subset())) << std::endl;
194 double time = swatch.getTimeInSeconds();
195 QDPIO::cout <<
"BICGSTAB_SOLVER_TIME: "<<time<<
" sec" << std::endl;
Chronological predictor for HMC.
Abstract interface for a Chronological Solution predictor.
virtual void newVector(const T &psi)=0
Abstract interface for a Chronological Solution predictor.
virtual void predictY(T &Y, const T &chi, const Subset &s) const
virtual void newYVector(const T &Y)=0
virtual void predictX(T &X, const T &chi, const Subset &s) const
virtual void newXVector(const T &X)=0
Class for counted reference semantics.
Solve a BiCGStab system. Here, the operator is NOT assumed to be hermitian.
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solver the linear system.
Handle< LinearOperator< T > > A
~MdagMSysSolverBiCGStab()
Destructor is automatic.
const Subset & subset() const
Return the subset on which the operator acts.
SysSolverBiCGStabParams invParam
MdagMSysSolverBiCGStab(Handle< LinearOperator< T > > A_, const SysSolverBiCGStabParams &invParam_)
Constructor.
SystemSolver disambiguator.
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.
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.
LinOpSysSolverMGProtoClover::T T
SystemSolverResults_t InvBiCGStab(const LinearOperator< LatticeFermionF > &A, const LatticeFermionF &chi, LatticeFermionF &psi, const Real &RsdBiCGStab, int MaxBiCGStab, enum PlusMinus isign)
multi1d< LatticeFermion > chi(Ncb)
Params for BiCGStab inverter.
Holds return info from SystemSolver call.
Disambiguator for MdagM system solvers.
Handle< LinearOperator< T > > MdagM
Zero initial guess predictor.