Esempio n. 1
0
int mat_invert( field_offset src, field_offset dest ){
  register int i;
  register site *s;
  int iters;

  if( src != F_OFFSET(CHI) ){
    FORALLSITES(i,s) s->CHI = *(wilson_vector *)F_PT(s,src);
  }

  /* Load inversion control structure */
  qic.prec = PRECISION;
  qic.min = 0;
  qic.max = niter;
  qic.nrestart = 5;
  qic.resid = rsqprop;
  qic.start_flag = 0;

  /* Load Dirac matrix parameters */
  dcp.Kappa = kappa;
  dcp.Clov_c = clov_c;
  dcp.U0 = u0;
  
#ifdef BI
  iters = 
    wilson_invert_site(F_OFFSET(CHI),dest,
		       bicgilu_cl_site,&qic,(void *)&dcp);
#else
  
  iters = 
    wilson_invert_site(F_OFFSET(CHI),dest,
		       cgilu_cl_site,&qic,(void *)&dcp);
#endif
  return(iters);
}
Esempio n. 2
0
void generate_heavy_zonked(int color, int spin, 
			   Real Kappa, int inverter_type, field_offset dest)
{
  int MinCG;

  if( this_node == 0 )  printf("Starting heavy_zonked inversions, kappa = %f\n",
			       Kappa); 

  
  /*** do the heavy quark inversion ****/
  load_wilson_source(F_OFFSET(heavy_smear_func), F_OFFSET(psi), color, spin) ; 
  
  /* To be sure we "hop" far enough in the inversion */
  /* Note: one iteration advances two time slices
     so nt covers the lattice twice */
  MinCG = nt;
  
  /* Load inversion control structure */
  qic_zonked_heavy.prec = PRECISION;
  qic_zonked_heavy.min = MinCG;
  qic_zonked_heavy.max = niter_zonked_heavy;
  qic_zonked_heavy.nrestart = nrestart_zonked_heavy;
  qic_zonked_heavy.resid = resid_zonked_heavy;
  qic_zonked_heavy.start_flag = START_ZERO_GUESS;
  
#ifdef CLOVER
  /* Load Dirac matrix parameters */
  dcp.Kappa = Kappa;
  dcp.Clov_c = clov_c;
  dcp.U0 = u0;
  
  /* Use specified inverter */
  if(inverter_type == HOPILU)
    {
      qic_zonked_heavy.nrestart = 1;   /* No restarts with hopping inverter */
      wilson_invert_site(F_OFFSET(psi), dest,
			 hopilu_cl_site,&qic_zonked_heavy,(void *)&dcp);
    }
  else if(inverter_type == BICGILU)
    wilson_invert_site(F_OFFSET(psi), dest,
		       bicgilu_cl_site,&qic_zonked_heavy,(void *)&dcp);
  else
    {
      printf("generate_heavy_zonked: ERROR inverter type %d unknown\n",
	     inverter_type);
      terminate(1);
    }
  
#else
  /* Load Dirac matrix parameters */
  dwp.Kappa = Kappa;
  
  wilson_invert_site(F_OFFSET(psi), dest,
		     mrilu_w_site,&qic_zonked_heavy,(void *)&dwp);
#endif
  /*** store the quark propagator to disk ****/

} /*** end of generate_and_store_heavy_zonked  ***/