16 const Real& epsilon_prec,
21 const Subset&
s= UnprecU.
subset();
28 multi1d<T*>
C(MaxGMRESR);
29 multi1d<T*>
U(MaxGMRESR);
39 int prec_count_total = 0;
42 while( toBool( norm_r > terminate) && iter < MaxGMRESR ) {
53 InvRelSUMR(PrecU,
r, *
u, zeta, rho, epsilon_prec*norm_r, MaxGMRESRPrec, prec_count);
54 prec_count_total += prec_count;
61 Real inner_tol = terminate / norm_r;
65 UnprecU( *
c, *
u,
PLUS, inner_tol);
72 for(
int i =0;
i < C_size;
i++) {
95 norm_r = sqrt(norm2(
r,
s));
96 QDPIO::cout <<
"Inv Rel GMRESR: iter "<< iter <<
" || r || = " << norm_r << std::endl;
100 for(
int i=0;
i < C_size;
i++) {
105 if( iter == MaxGMRESR ) {
106 QDPIO::cout <<
"Nonconvergence warning " << std::endl;
117 const LatticeFermion&
b,
120 const Real& epsilon_prec,
125 InvRelGMRESR_SUMR_a(PrecU, zeta, rho, UnprecU,
b,
x,
epsilon, epsilon_prec, MaxGMRESR, MaxGMRESRPrec,
n_count);
Primary include file for CHROMA library code.
virtual const Subset & subset() const =0
Return the subset on which the operator acts.
Relaxed GMRESR algorithm of the Wuppertal Group.
Conjugate-Gradient algorithm for a generic Linear Operator.
SpinMatrix C()
C = Gamma(10)
int epsilon(int i, int j, int k)
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
static const LatticeInteger & beta(const int dim)
static const LatticeInteger & alpha(const int dim)
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
void InvRelGMRESR_SUMR(const LinearOperator< LatticeFermion > &PrecU, const Complex &zeta, const Real &rho, const LinearOperator< LatticeFermion > &UnprecU, const LatticeFermion &b, LatticeFermion &x, const Real &epsilon, const Real &epsilon_prec, int MaxGMRESR, int MaxGMRESRPrec, int &n_count)
void InvRelSUMR(const LinearOperator< LatticeFermion > &U, const LatticeFermion &b, LatticeFermion &x, const Complex &zeta, const Real &rho, const Real &epsilon, int MaxSUMR, int &n_count)
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > s(Ncb)
void InvRelGMRESR_SUMR_a(const LinearOperator< T > &PrecU, const Complex &zeta, const Real &rho, const LinearOperator< T > &UnprecU, const T &b, T &x, const Real &epsilon, const Real &epsilon_prec, int MaxGMRESR, int MaxGMRESRPrec, int &n_count)
FloatingPoint< double > Double
multi1d< LatticeColorMatrix > U