PropToFerm(q_src, tmp[0], color_source, spin_source);
PropToFerm(q_src, tmp, color_source, spin_source);
void dwf_quarkProp4_a(LatticePropagator& q_sol, 		      XMLWriter& xml_out,		      const LatticePropagator& q_src,		      const int t_src,		      const C<T>& S_f,		      Handle<const ConnectState> state,		      enum InvType invType,		      const Real& RsdCG, 		      int MaxCG, int& ncg_had){  START_CODE("dwf_quarkProp4");  push(xml_out, "DWF_QuarkProp4");  ncg_had = 0;  multi1d<LatticePropagator> prop5d(S_f.size()) ;  LatticePropagator q_mp  ;  multi1d<LatticeFermion> psi(S_f.size()) ;   psi = zero;  // note this is ``zero'' and not 0     // This version loops over all color and spin indices  for(int color_source = 0; color_source < Nc; ++color_source)  {    for(int spin_source = 0; spin_source < Ns; ++spin_source)    {      multi1d<LatticeFermion> tmp(S_f.size()) ;      tmp = zero ;      PropToFerm(q_src, tmp[0], color_source, spin_source);      // Use the last initial guess as the current initial guess	         /*        * Normalize the source in case it is really huge or small -        * a trick to avoid overflows or underflows       */      Real fact = Real(1) / sqrt(norm2(tmp[0]));      for(int i = 0; i < tmp.size(); ++i)	tmp[i] *= fact; 	         multi1d<LatticeFermion> chi(S_f.size()) ;	         // Split the source to oposite walls according to chirality      DwfFld(chi, tmp, PLUS);      // now we are ready invert	         // Compute the propagator for given source color/spin.      int n_count;	         S_f.qpropT(psi, state, chi, invType, RsdCG, MaxCG, n_count);      ncg_had += n_count;	         push(xml_out,"Qprop");      write(xml_out, "RsdCG", RsdCG);      Write(xml_out, n_count);      pop(xml_out);      // Unnormalize the source following the inverse       // of the normalization above      fact = Real(1) / fact;      for(int i = 0; i < tmp.size(); ++i)	psi[i] *= fact;       /*       * Move the solution to the appropriate components       * of quark propagator.       */	         //First the 5D quark propagator      for(int s(0);s<S_f.size();s++)	FermToProp(psi[s], prop5d[s], color_source, spin_source);      // Now get the 4D propagator too      // move the light states to wall 0      DwfFld(tmp, psi, MINUS);       // move solution to the appropriate components of the 4d      // quark propagator      FermToProp(tmp[0], q_sol, color_source, spin_source);      // move solution to the appropriate components of the 4d      // midpoint quark propagator which occures at N5/2 -1       FermToProp(tmp[S_f.size()/2 - 1], q_mp, color_source, spin_source);	       }	/* end loop over spin_source */  } /* end loop over color_source */  // constuct the conserved axial current correlator  LatticeComplex cfield ;  dwf_conserved_axial_ps_corr(cfield,state->getLinks(),prop5d,3,S_f.size());			         multi1d<DComplex> corr ;       SftMom trick(0,false,3) ;     corr = sumMulti(cfield, trick.getSet());  // Length of lattice in decay direction  int length = trick.numSubsets();  multi1d<Real> mesprop(length);    for(int t(0);t<length; t++){    int t_eff( (t - t_src + length) % length ) ;    mesprop[t_eff] = real(corr[t]) ; // only need the zero momentum  }  //push(xml_out, "t_dir");  //Write(xml_out, 3);  //pop(xml_out);  push(xml_out, "DWF_ConservedAxial");  //write(xml_out, "corr", corr);  Write(xml_out, mesprop);   pop(xml_out);  //Now the midpoint Pseudoscalar correlator  multi1d<Double> tmp(length);  tmp = sumMulti(localNorm2(q_mp), trick.getSet());  for(int t(0);t<length; t++){    int t_eff( (t - t_src + length) % length ) ;    mesprop[t_eff] = tmp[t] ; // only need the zero momentum  }    push(xml_out, "DWF_MidPoint_Pseudo");  Write(xml_out, mesprop);  pop(xml_out);  pop(xml_out);   // DWF_QuarkProp4  END_CODE("dwf_quarkProp4");}