8 using namespace QDP::Hints;
73 int MaxCG,
int MinCG=0)
77 const Subset&
s =
A.subset();
81 T p; moveToFastMemoryHint(
p);
82 T ap; moveToFastMemoryHint(ap);
85 moveToFastMemoryHint(
psi,
true);
87 T r; moveToFastMemoryHint(
r);
88 T chi_internal; moveToFastMemoryHint(chi_internal);
106 r[
s] = chi_internal - ap;
115 QDPIO::cout <<
"InvCG1: k = 0 cp = " <<
cp <<
" rsd_sq = " <<
rsd_sq
124 revertFromFastMemoryHint(
psi,
true);
153 d = innerProductReal(
p, ap,
s);
176 QDPIO::cout <<
"InvCG1: k = " <<
k <<
" cp = " <<
cp << std::endl;
179 if ( toBool(
cp <=
rsd_sq) && (toBool(MinCG <= 0 ) || toBool(
k >= MinCG )))
188 res.
resid = sqrt(actual_res);
190 QDPIO::cout <<
"InvCG1: true residual: " << res.
resid << std::endl;
193 revertFromFastMemoryHint(
psi,
true);
199 b = Real(
cp) / Real(
c);
207 revertFromFastMemoryHint(
psi,
true);
214 SystemSolverResults_t
216 const LatticeFermion&
chi,
225 SystemSolverResults_t
227 const LatticeStaggeredFermion&
chi,
228 LatticeStaggeredFermion&
psi,
Primary include file for CHROMA library code.
SystemSolverResults_t InvCG1_a(const LinearOperator< T > &A, const T &chi, T &psi, const Real &RsdCG, int MaxCG, int MinCG=0)
Conjugate-Gradient (CGNE) algorithm for a generic Linear Operator.
Conjugate-Gradient algorithm for a generic Linear Operator.
Asqtad Staggered-Dirac operator.
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > enum InvType invType const multi1d< Real > & RsdCG
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
LinOpSysSolverMGProtoClover::T T
SystemSolverResults_t InvCG1(const LinearOperator< LatticeStaggeredFermion > &A, const LatticeStaggeredFermion &chi, LatticeStaggeredFermion &psi, const Real &RsdCG, int MaxCG, int MinCG)
FloatingPoint< double > Double
multi1d< LatticeFermion > r(Ncb)
Holds return info from SystemSolver call.