13 const multi1d<T> &
chi,
15 const Real& RsdBiCGStab,
20 const int N =
psi.size();
22 const Subset&
s =
A.subset();
28 Real chi_sq = norm2(
chi,
s);
31 Real
rsd_sq = RsdBiCGStab*RsdBiCGStab*chi_sq;
41 for(
int n=0;
n < N;
n++) {
55 for(
int n = 0;
n < N;
n++) {
75 for(
int k = 1;
k <= MaxBiCGStab && !convP ;
k++) {
79 for(
int n=0;
n < N;
n++) {
84 if( toBool( real(rho) == 0 ) && toBool( imag(rho) == 0 ) ) {
85 QDPIO::cout <<
"BiCGStab breakdown: rho = 0" << std::endl;
99 for(
int n=0;
n < N;
n++) {
110 Complex ctmp=Real(0);
111 for(
int n = 0;
n < N;
n++) {
115 if( toBool( real(ctmp) == 0 ) && toBool( imag(ctmp) == 0 ) ) {
116 QDPIO::cout <<
"BiCGStab breakdown: <r_0|v> = 0" << std::endl;
127 for(
int n = 0;
n < N;
n++) {
137 Real t_norm = norm2(
t,
s);
139 if( toBool(t_norm == 0) ) {
140 QDPIO::cerr <<
"Breakdown || Ms || = || t || = 0 " << std::endl;
146 for(
int n = 0;
n < N;
n++) {
157 for(
int n=0;
n < N;
n++) {
163 for(
int n=0;
n < N;
n++){
170 QDPIO::cout <<
"Iteration " <<
k <<
" : r = " <<
r_norm << std::endl;
181 if ( ret.
n_count == MaxBiCGStab ) {
182 QDPIO::cerr <<
"Nonconvergence of BiCGStab. MaxIters reached " << std::endl;
191 SystemSolverResults_t
193 const multi1d<LatticeFermion>&
chi,
194 multi1d<LatticeFermion>&
psi,
195 const Real& RsdBiCGStab,
Primary include file for CHROMA library code.
Linear Operator to arrays.
Conjugate-Gradient algorithm for a generic Linear Operator.
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.
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)
SystemSolverResults_t InvBiCGStab_a(const LinearOperator< T > &A, const T &chi, T &psi, const Real &RsdBiCGStab, int MaxBiCGStab, enum PlusMinus isign)
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Holds return info from SystemSolver call.