36 const LatticeFermion&
psi,
68 const LatticeFermion&
psi,
78 const int G5 = Ns * Ns - 1;
81 Real
mass = ( Real(1) +
m_q ) / ( Real(1) -
m_q );
82 Real init_fac = (Real(1)/
mass) +
mass;
84 LatticeFermion psi_proj =
psi;
113 psi_proj -= cconsts *
EigVec[
i];
128 std::ostringstream error_message;
129 error_message <<
"Should not use lovddag_double_pass unless the chirality is either CH_PLUS or CH_MINUS" << std::endl;
130 throw error_message.str();
140 chi += cconsts * tmp1;
165 (*M)( ltmp, psi_proj,
PLUS);
166 tmp1 = Gamma(
G5)*ltmp;
171 if ( toBool(
c == Real(0)) ) {
200 multi1d<Double>
a(
MaxCG+1);
201 multi1d<Double>
b(
MaxCG+1);
226 multi1d<Double> c_iter(
MaxCG+1);
233 for(
k = 0;
k <
MaxCG && ! convP ; ++
k) {
237 (*MdagM)(Ap,
p,
PLUS);
246 d = innerProductReal(
p, Ap);
264 p =
r + Real(
b[
k+1])*
p;
272 multi2d<Double> gamma(niters+1,
numroot);
279 multi1d<int> convIter(
numroot);
282 for(
int j=0;
j < niters;
j++) {
286 if(
s !=
isz && ! convPs[
s] ) {
306 ga_minus = gamma[
j-1][
s];
309 Double tmp_num = ga*ga_minus*a_minus;
311 tmp_den +=
a[
j]*
b[
j]*(ga_minus - ga);
313 gamma[
j+1][
s] = tmp_num/tmp_den;
318 if( toBool( gamma[
j+1][
s]*gamma[
j+1][
s]*c_iter[
j+1] <
rsd_sq ) ) {
332 multi1d<Double> sumC(niters+1);
334 for(
int j=0;
j<=niters;
j++) {
338 for(
int m=0;
m < niters-
j;
m++) {
350 if( toBool( (
j+
m+1) <= convIter[
s] ) ) {
361 for(
int k=1;
k <=
m;
k++) {
367 sumC[
j] +=
a[
j+
m]*delta_m*qsum;
380 for(
k=0;
k < niters && !convP ;
k++) {
381 (*MdagM)(Ap,
p,
PLUS);
391 ltmp += Real(sumC[
k])*
r;
408 convP = toBool( c_iter[
k+1]*sumC[
k+1]*sumC[
k+1] < ltmp_norm_new );
411 p =
r + Real(
b[
k+1])*
p;
420 tmp1 = Gamma(
G5)*ltmp;
437 ftmp = Real(0.25) * (Real(1) -
m_q*
m_q);
439 QDPIO::cout <<
"Overlap Inner Solve (lovddag_double_pass(" <<
ichiral <<
")) = " <<
k <<
" iterations" << std::endl;
Primary include file for CHROMA library code.
const multi1d< LatticeFermion > EigVec
const multi1d< Real > rootQ
const multi1d< Real > EigValFunc
const multi1d< Real > resP
Gramm-Schmidt orthogonolization.
void GramSchm(multi1d< LatticeFermion > &psi, const int Npsi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
Gramm-Schmidt orthogonolization.
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
Internal Overlap-pole operator.
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)
Asqtad Staggered-Dirac operator.
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)
multi1d< LatticeFermion > chi(Ncb)
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double