CHROMA
t_propagator_fuzz_s.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Main code for propagator generation
3  *
4  * Start to add fuzzed source to the staggered
5  * project.
6  */
7 
8 #include <iostream>
9 #include <cstdio>
10 
11 #define MAIN
12 
13 // Include everything...
14 #include "chroma.h"
15 
16 // more work -- this should be in chroma.h
17 #include "meas/smear/fuzz_smear.h"
18 
19 /*
20  * Here we have various temporary definitions
21  */
22 /*
23 
24 
25 enum FermType {
26 FERM_TYPE_STAGGERED,
27 FERM_TYPE_UNKNOWN
28 };
29 
30 
31 using namespace Chroma;
32 
33 
34 /*
35 * Input
36 */
37 
38 
39 // Parameters which must be determined from the XML input
40 // and written to the XML output
41 struct Param_t
42 {
44  Real Mass; // Staggered mass
45  Real u0; // Tadpole Factor
46 
47  PropType prop_type; // storage order for stored propagator
48 
50 
51  Real GFAccu, OrPara; // Gauge fixing tolerance and over-relaxation param
52  int GFMax; // Maximum gauge fixing iterations
53 
54  multi1d<int> nrow;
55  multi1d<int> boundary;
56  multi1d<int> t_srce;
57 };
58 
59 
60 struct Prop_t
61 {
64 };
65 
66 struct Propagator_input_t
67 {
69  Param_t param;
70  Cfg_t cfg;
71  Prop_t prop;
72 };
73 
74 
75 //
76 void read(XMLReader& xml, const std::string& path, Prop_t& input)
77 {
78  XMLReader inputtop(xml, path);
79 
80 // read(inputtop, "source_file", input.source_file);
81  read(inputtop, "prop_file", input.prop_file);
82 }
83 
84 
85 
86 // Reader for input parameters
87 void read(XMLReader& xml, const std::string& path, Propagator_input_t& input)
88 {
89  XMLReader inputtop(xml, path);
90 
91 
92  // First, read the input parameter version. Then, if this version
93  // includes 'Nc' and 'Nd', verify they agree with values compiled
94  // into QDP++
95 
96  // Read in the IO_version
97  try
98  {
99  read(inputtop, "IO_version/version", input.io_version.version);
100  }
101  catch (const std::string& e)
102  {
103  QDPIO::cerr << "Error reading data: " << e << std::endl;
104  throw;
105  }
106 
107 
108  // Currently, in the supported IO versions, there is only a small difference
109  // in the inputs. So, to make code simpler, extract the common bits
110 
111  // Read the uncommon bits first
112  try
113  {
114  XMLReader paramtop(inputtop, "param"); // push into 'param' group
115 
116  switch (input.io_version.version)
117  {
118  /**************************************************************************/
119  case 1 :
120  /**************************************************************************/
121  break;
122 
123  default :
124  /**************************************************************************/
125 
126  QDPIO::cerr << "Input parameter version " << input.io_version.version << " unsupported." << std::endl;
127  QDP_abort(1);
128  }
129  }
130  catch (const std::string& e)
131  {
132  QDPIO::cerr << "Error reading data: " << e << std::endl;
133  throw;
134  }
135 
136 
137  // Read the common bits
138  try
139  {
140  XMLReader paramtop(inputtop, "param"); // push into 'param' group
141 
142  {
143  std::string ferm_type_str;
144  read(paramtop, "FermTypeP", ferm_type_str);
145  if (ferm_type_str == "STAGGERED") {
147  }
148  }
149 
150  // GTF NOTE: I'm going to switch on FermTypeP here because I want
151  // to leave open the option of treating masses differently.
152  switch (input.param.FermTypeP) {
153  case FERM_TYPE_STAGGERED :
154 
155  QDPIO::cout << " PROPAGATOR: Propagator for Staggered fermions" << std::endl;
156 
157  read(paramtop, "Mass", input.param.Mass);
158  read(paramtop, "u0" , input.param.u0);
159 
160  break;
161 
162  default :
163  QDP_error_exit("Fermion type not supported\n.");
164  }
165 
166 // read(paramtop, "invType", input.param.invType);
167  read(paramtop, "RsdCG", input.param.invParam.RsdCG);
168  read(paramtop, "MaxCG", input.param.invParam.MaxCG);
169  read(paramtop, "GFAccu", input.param.GFAccu);
170  read(paramtop, "OrPara", input.param.OrPara);
171  read(paramtop, "GFMax", input.param.GFMax);
172 
173  read(paramtop, "nrow", input.param.nrow);
174  read(paramtop, "boundary", input.param.boundary);
175  read(paramtop, "t_srce", input.param.t_srce);
176  }
177  catch (const std::string& e)
178  {
179  QDPIO::cerr << "Error reading data: " << e << std::endl;
180  throw;
181  }
182 
183 
184  // Read in the gauge configuration file name
185  try
186  {
187  read(inputtop, "Cfg", input.cfg);
188  read(inputtop, "Prop", input.prop);
189  }
190  catch (const std::string& e)
191  {
192  QDPIO::cerr << "Error reading data: " << e << std::endl;
193  throw;
194  }
195 }
196 
197 
200 
201 /*
202  Function to return the type of staggered
203  source.
204 */
205 
206 stag_src_type get_stag_src(XMLReader& xml, const std::string& path)
207 {
208  stag_src_type ans ;
209 
210  try
211  {
212  std::string src_name;
213  read(xml, path, src_name);
214  if (src_name == "LOCAL_SRC")
215  {
216  QDPIO::cout << "****> LOCAL SOURCE <****" << std::endl;
217  ans = LOCAL_SRC ;
218  }
219  else if (src_name == "GAUGE_INVAR_LOCAL_SOURCE")
220  {
221  QDPIO::cout << "****> GAUGE INVARIANT LOCAL SOURCE <****" << std::endl;
222  ans = GAUGE_INVAR_LOCAL_SOURCE ;
223  }
224  else if (src_name == "FUZZED_SRC")
225  {
226  QDPIO::cout << "***> FUZZED SOURCE ****" << std::endl;
227  ans = FUZZED_SRC ;
228  }
229 
230  else
231  {
232  QDPIO::cerr << "src_name " << src_name << " out of range " << std::endl;
233  QDP_abort(1);
234  }
235  }
236  catch (const std::string& e)
237  {
238  QDPIO::cerr << "Error reading data: " << e << std::endl;
239  throw;
240  }
241 
242  return ans ;
243 }
244 
245 ////////////////////////////////////////////////////////////
246 ////////////////////////////////////////////////////////////
247 
249  LatticeStaggeredPropagator & quark_propagator,
250  XMLFileWriter & xml_out,
251  int j_decay, int tlength) ;
252 
253 
255  LatticeStaggeredPropagator & quark_propagator_a,
256  LatticeStaggeredPropagator & quark_propagator_b,
257  LatticeStaggeredPropagator & quark_propagator_c,
258  XMLFileWriter & xml_out,
259  int j_decay, int tlength) ;
260 
261 
262 int ks_compute_quark_propagator(LatticeStaggeredFermion & psi,
263  stag_src_type type_of_src,
264  int fuzz_width,
265  multi1d<LatticeColorMatrix> & u ,
266  multi1d<LatticeColorMatrix> & u_smr,
268  XMLFileWriter & xml_out,
269  Real RsdCG, Real Mass,
270  int j_decay,
271  int src_ind, int color_source) ;
272 
273 ////////////////////////////////////////////////////////////
274 ////////////////////////////////////////////////////////////
275 
276 //! Propagator generation
277 /*! \defgroup t_propagator_fuzz Propagator generation
278  * \ingroup testsmain
279  *
280  * Main program for propagator generation.
281  */
282 
283 int main(int argc, char **argv)
284 {
285  // Put the machine into a known state
286  Chroma::initialize(&argc, &argv);
287 
288  // Input parameter structure
289  Propagator_input_t input;
290 
291  // Get the name of the input file and read its contents
292 
293  XMLReader xml_in ;
295  try
296  {
297  xml_in.open(in_name);
298  }
299  catch (...)
300  {
301  QDPIO::cerr << "Error reading input file " << in_name << std::endl;
302  QDPIO::cerr << "The input file name can be passed via the -i flag " << std::endl;
303  QDPIO::cerr << "The default name is ./DATA" << std::endl;
304  throw;
305  }
306 
307 
308  // Read data
309  read(xml_in, "/propagator", input);
310 
311  // Specify lattice size, shape, etc.
312  Layout::setLattSize(input.param.nrow);
313  Layout::create();
314 
315  // Read in the configuration along with relevant information.
316  multi1d<LatticeColorMatrix> u(Nd);
317 
318  XMLReader gauge_file_xml, gauge_xml;
319  gaugeStartup(gauge_file_xml, gauge_xml, u, input.cfg);
320 
321 
322  stag_src_type type_of_src =
323  get_stag_src(xml_in,"/propagator/param/src_type") ;
324 
325  int fuzz_width = 2 ;
326  if( type_of_src == FUZZED_SRC )
327  {
328  try
329  {
330  read(xml_in, "/propagator/param/fuzz_width",fuzz_width );
331  }
332  catch (const std::string& e)
333  {
334  QDPIO::cerr << "Error reading fuzzing width " << e << std::endl;
335  throw;
336  }
337 
338 
339  QDPIO::cout << "fuzz width = " << fuzz_width << std::endl;
340  }
341 
342 
343  bool use_gauge_invar_oper ;
344  use_gauge_invar_oper = false ;
345  read(xml_in, "/propagator/param/use_gauge_invar_oper",use_gauge_invar_oper );
346 
347 
348  //
349  // gauge invariance test
350  //
351 
352  // this parameter will be read from the input file
353  bool do_gauge_transform ;
354  do_gauge_transform = false ;
355  read(xml_in, "/propagator/param/do_gauge_transform",do_gauge_transform );
356 
357  if( do_gauge_transform )
358  {
359  // gauge transform the gauge fields
360  multi1d<LatticeColorMatrix> u_trans(Nd);
361 
362  // create a random gauge transform
363  LatticeColorMatrix v ;
364 
365  gaussian(v);
366  reunit(v) ;
367 
368  for(int dir = 0 ; dir < Nd ; ++dir)
369  {
370  u_trans[dir] = v*u[dir]*adj(shift(v,FORWARD,dir)) ;
371  u[dir] = u_trans[dir] ;
372  }
373 
374  QDPIO::cout << "Random gauge transform done" << std::endl;
375 
376  } // end of gauge transform
377 
378 
379 
380  // Instantiate XML writer for the output
381  XMLFileWriter& xml_out = Chroma::getXMLOutputInstance();
382  push(xml_out, "fuzzed_hadron_corr");
383 
384  // Write out the input parameter file
385  write(xml_out, "Input", xml_in);
386 
387  // Write out the config header
388  write(xml_out, "Config_info", gauge_xml);
389 
390 
391  push(xml_out, "Output_version");
392  write(xml_out, "out_version", 1);
393  pop(xml_out);
394 
395  xml_out.flush();
396 
397  // Check if the gauge field configuration is unitarized
398  unitarityCheck(u);
399 
400  // Calculate some gauge invariant observables just for info.
401  MesPlq(xml_out, "Observables", u);
402  xml_out.flush();
403 
404  // Fix to the coulomb gauge
405  int n_gf;
406  int j_decay = Nd-1;
407 
408  if( ! use_gauge_invar_oper )
409  {
410  QDPIO::cout << "Starting Coulomb gauge fixing" << std::endl;
411  coulGauge(u, n_gf, j_decay, input.param.GFAccu, input.param.GFMax, true, input.param.OrPara);
412  QDPIO::cout << "No. of gauge fixing iterations =" << n_gf << std::endl;
413  }
414 
415  //
416  // Ape fuzz the gauge fields
417  //
418 
419  multi1d<LatticeColorMatrix> u_smr(Nd);
420 
421  if( type_of_src == FUZZED_SRC )
422  {
423  QDPIO::cout << "Starting to APE smear the gauge configuration" << std::endl;
424 
425  Real sm_fact = 2.5; // typical parameter
426  int sm_numb = 10; // number of smearing hits
427 
428  int BlkMax = 100; // max iterations in max-ing trace
429  Real BlkAccu = 1.0e-5; // accuracy of max-ing
430 
431  u_smr = u;
432  for(int i=0; i < sm_numb; ++i)
433  {
434  multi1d<LatticeColorMatrix> u_tmp(Nd);
435 
436  for(int mu = 0; mu < Nd; ++mu)
437  if ( mu != j_decay )
438  APE_Smear(u_smr, u_tmp[mu], mu, 0, sm_fact, BlkAccu, BlkMax, j_decay);
439  else
440  u_tmp[mu] = u_smr[mu];
441 
442  u_smr = u_tmp;
443  }
444 
445  }
446 
447  //
448  // --- end of APE smearing -----
449  //
450 
451  // Calcluate plaq on the gauge fixed field
452  MesPlq(xml_out, "Observables", u);
453  xml_out.flush();
454 
455  // Create a fermion BC. Note, the handle is on an ABSTRACT type.
457 
458  //
459  // Initialize fermion action
460  //
461  AsqtadFermAct S_f(fbc, input.param.Mass, input.param.u0);
462 
463  // Set up a state for the current u,
464  // (compute fat & triple links)
465  // Use S_f.createState so that S_f can pass in u0
466 
467  GroupXML_t inv_param;
468  {
469  XMLBufferWriter xml_buf;
470  write(xml_buf, "InvertParam", input.param.invParam);
471  XMLReader xml_in(xml_buf);
472  inv_param = readXMLGroup(xml_in, "/InvertParam", "invType");
473  }
474  Handle<const ConnectState > state(S_f.createState(u));
476 
477 
478  //
479  // Loop over the source color, creating the source
480  // and calling the relevant propagator routines.
481  //
482 
483  LatticeStaggeredPropagator quark_propagator;
484  XMLBufferWriter xml_buf;
485  int ncg_had = 0;
486  int n_count;
487 
488  LatticeStaggeredFermion psi;
489  multi1d<LatticeStaggeredPropagator> stag_prop(8);
490 
491  // the staggered spectroscopy code is hardwired
492  // for many pions (why range of 0)
493  for(int src_ind = 0; src_ind < 8; ++src_ind)
494  stag_prop[src_ind] = zero ;
495 
496 
497  // pass the origin from input file
498  int t_source = 0;
499  QDPIO::cout << "Source time slice = " << t_source << std::endl;
500 
501 
502  // just look at the local pion (8 should be system constant)
503  for(int src_ind = 0; src_ind < 1 ; ++src_ind){
504  psi = zero; // note this is ``zero'' and not 0
505 
506  for(int color_source = 0; color_source < Nc; ++color_source)
507  {
508 
509 
510  ncg_had += ks_compute_quark_propagator(psi,type_of_src, fuzz_width,
511  u, u_smr, qprop, xml_out,
512  input.param.invParam.RsdCG,
513  input.param.Mass,
514  j_decay,
515  src_ind, color_source) ;
516 
517  /*
518  * Move the solution to the appropriate components
519  * of quark propagator.
520  */
521  FermToProp(psi, quark_propagator, color_source);
522  } //color_source
523 
524  stag_prop[src_ind] = quark_propagator;
525  } // end src_ind
526 
527 
528  push(xml_out, "Hadrons_from_time_source");
529  write(xml_out, "source_time", t_source);
530  if( type_of_src == LOCAL_SRC )
531  { write(xml_out, "source_type", "LOCAL_SRC"); }
532  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE )
533  { write(xml_out, "source_type", "GAUGE_INVAR_LOCAL_SOURCE"); }
534  else if( type_of_src == FUZZED_SRC )
535  {
536  write(xml_out, "source_type", "FUZZED_SRC");
537  write(xml_out, "fuzzed_width", fuzz_width);
538  }
539 
540 
541  int t_length = input.param.nrow[3];
542  staggered_pions pseudoscalar(t_length,u) ;
543 
544  write(xml_out, "use_gauge_invar_oper", use_gauge_invar_oper);
545  if( use_gauge_invar_oper )
546  {
547  std::cout << "Using gauge invariant operators " << std::endl ;
548  pseudoscalar.use_gauge_invar() ;
549  }
550  else
551  {
552  std::cout << "Using NON-gauge invariant operators " << std::endl ;
553  pseudoscalar.use_NON_gauge_invar() ;
554  }
555 
556 
557  pseudoscalar.compute(stag_prop, j_decay);
558  pseudoscalar.dump(t_source,xml_out);
559  pop(xml_out);
560 
561  //
562  // compute some simple baryon operators
563  //
564 
565  push(xml_out, "baryon_correlators");
566  std::string b_tag("nucleon") ;
567  ks_compute_baryon(b_tag,quark_propagator, xml_out, j_decay,
568  input.param.nrow[3]) ;
569 
570  std::string lll_tag("LLL_nucleon") ;
571  ks_compute_baryon(lll_tag,quark_propagator, quark_propagator,
572  quark_propagator,
573  xml_out, j_decay,
574  input.param.nrow[3]) ;
575 
576  pop(xml_out); // baryon correlators
577 
578 
579  pop(xml_out);
580  xml_out.close();
581  xml_in.close();
582 
583  // Time to bolt
585 
586  exit(0);
587 }
588 
589 
590 //
591 // wrapper routine for baryon operators
592 //
593 
595  LatticeStaggeredPropagator & quark_propagator,
596  XMLFileWriter & xml_out,
597  int j_decay, int tlength)
598 {
599  int bc_spec = 0 ;
600  multi1d<int> coord(Nd);
601  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
602 
603  multi1d<Complex> barprop(tlength) ;
604 
605  baryon_s(quark_propagator,barprop,
606  coord,j_decay, bc_spec) ;
607 
608 
609  write(xml_out, name, barprop);
610 
611 
612 
613 }
614 
615 
616 
617 //
618 // wrapper routine for baryon operators
619 //
620 
622  LatticeStaggeredPropagator & quark_propagator_a,
623  LatticeStaggeredPropagator & quark_propagator_b,
624  LatticeStaggeredPropagator & quark_propagator_c,
625  XMLFileWriter & xml_out,
626  int j_decay, int tlength)
627 {
628  int bc_spec = 0 ;
629  multi1d<int> coord(Nd);
630  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
631 
632  multi1d<Complex> barprop(tlength) ;
633 
634  baryon_s(quark_propagator_a,quark_propagator_b,quark_propagator_c,
635  barprop,coord,j_decay, bc_spec) ;
636 
637  write(xml_out, name, barprop);
638 
639 }
640 
641 
642 
643 
644 int ks_compute_quark_propagator(LatticeStaggeredFermion & psi,
645  stag_src_type type_of_src,
646  int fuzz_width,
647  multi1d<LatticeColorMatrix> & u ,
648  multi1d<LatticeColorMatrix> & u_smr,
650  XMLFileWriter & xml_out,
651  Real RsdCG, Real Mass,
652  int j_decay,
653  int src_ind, int color_source)
654 {
655  LatticeStaggeredFermion q_source ;
656  LatticeStaggeredFermion q_source_fuzz ;
657  int ncg_had = 0 ;
658 
659  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
660  q_source = zero ;
661 
662  if( type_of_src == LOCAL_SRC )
663  {
664  q_source = zero ;
665  multi1d<int> coord(Nd);
666 
667  PropIndexTodelta(src_ind, coord) ;
668  srcfil(q_source, coord,color_source ) ;
669  }
670  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE )
671  {
672  q_source = zero ;
673  multi1d<int> coord(Nd);
674 
675  // start with local source
676  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
677  srcfil(q_source, coord,color_source ) ;
678 
679  // now do the shift
680  PropIndexTodelta(src_ind, coord) ;
681  q_source_fuzz = q_source ;
682  q_source = shiftDeltaPropCov(coord,q_source_fuzz,u,
683  false);
684 
685  }
686  else if( type_of_src == FUZZED_SRC )
687  {
688  q_source = zero ;
689  multi1d<int> coord(Nd);
690 
691  PropIndexTodelta(src_ind, coord) ;
692  srcfil(q_source, coord,color_source ) ;
693 
694 
695  fuzz_smear(u_smr, q_source,q_source_fuzz,
696  fuzz_width, j_decay) ;
697 
698  q_source = q_source_fuzz ;
699  }
700 
701 
702 
703  // Use the last initial guess as the current guess
704 
705  // Compute the propagator for given source color/spin
706  // int n_count;
707 
708  SystemSolverResults_t res = (*qprop)(psi, q_source);
709  ncg_had += res.n_count;
710 
711  // this is done for xmldif reasons
712  if( src_ind == 0 )
713  {
714  push(xml_out,"Qprop");
715  write(xml_out, "Staggered_src_tag" , src_ind);
716  write(xml_out, "Mass" , Mass);
717  write(xml_out, "RsdCG", RsdCG);
718  write(xml_out, "n_count", res.n_count);
719  pop(xml_out);
720  }
721 
722 
723  return ncg_had ;
724 }
Primary include file for CHROMA in application codes.
Asqtad staggered fermion action.
Class for counted reference semantics.
Definition: handle.h:33
Concrete class for all gauge actions with simple boundary conditions.
Definition: simple_fermbc.h:42
void dump(int t_source, XMLWriter &xml_out)
Definition: hadron_corr_s.h:33
void compute(multi1d< LatticeStaggeredPropagator > &quark_props, int j_decay)
Definition: pions_s.cc:69
int mu
Definition: cool.cc:24
Fuzzed sources.
void FermToProp(const LatticeFermionF &a, LatticePropagatorF &b, int color_index, int spin_index)
Insert a LatticeFermion into a LatticePropagator.
Definition: transf.cc:98
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
Definition: unit_check.cc:20
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
void coulGauge(multi1d< LatticeColorMatrix > &u, int &n_gf, int j_decay, const Real &GFAccu, int GFMax, bool OrDo, const Real &OrPara)
Coulomb (and Landau) gauge fixing.
Definition: coulgauge.cc:37
FermType
Fermion type.
PropType
Propagator type.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
@ FERM_TYPE_STAGGERED
void APE_Smear(const multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &u_smear, int mu, int bl_level, const Real &sm_fact, const Real &BlkAccu, int BlkMax, int j_decay)
Construct APE smeared links from:
Definition: ape_smear.cc:44
void fuzz_smear(const multi1d< LatticeColorMatrix > &ufuzz, const T &psi, T &psifuzz, int length, int j_decay)
apply a fuzz_smear operator to a lattice field
Definition: fuzz_smear.cc:75
void srcfil(LatticeFermion &a, const multi1d< int > &coord, int color_index, int spin_index)
Fill a specific color and spin index with 1.0.
Definition: srcfil.cc:23
int bc_spec
Real Mass
unsigned i
Definition: ldumul_w.cc:34
multi1d< int > coord(Nd)
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
const std::string name
Name to be used.
gaussian(aux)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > enum InvType invType const multi1d< Real > & RsdCG
Definition: pbg5p_w.cc:30
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)
static multi1d< LatticeColorMatrix > u
void baryon_s(LatticeStaggeredPropagator &quark_propagator_in, multi1d< Complex > &barprop, multi1d< int > &t_source, int j_decay, int bc_spec)
Definition: baryon_s.cc:51
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
LatticeStaggeredPropagator shiftDeltaPropCov(multi1d< int > &delta, const LatticeStaggeredPropagator &src, multi1d< LatticeColorMatrix > u, bool sym_flag)
void reunit(LatticeColorMatrixF3 &xa)
Definition: reunit.cc:467
std::string getXMLInputFileName()
Get input file name.
Definition: chroma_init.cc:88
void PropIndexTodelta(int src_index, multi1d< int > &delta)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Definition: chroma_init.cc:359
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
Definition: pbg5p_w.cc:27
Double zero
Definition: invbicg.cc:106
::std::string string
Definition: gtest.h:1979
psi
Definition: pade_trln_w.cc:191
int n_count
Definition: pade_trln_w.cc:69
MesPlq(u, w_plaq, s_plaq, t_plaq, link)
#define FORWARD
Definition: primitives.h:82
Gauge configuration structure.
Definition: cfgtype_io.h:16
Hold group xml and type id.
Params for CG inverter.
Holds return info from SystemSolver call.
Definition: syssolver.h:17
Parameters for running program.
Definition: qpropadd.cc:17
PropType prop_type
Real OrPara
SysSolverCGParams invParam
FermType FermTypeP
multi1d< int > t_srce
multi1d< int > nrow
Definition: qpropadd.cc:18
Real GFAccu
multi1d< int > boundary
Propagators.
std::string source_file
std::string prop_file
IO_version_t io_version
stag_src_type get_stag_src(XMLReader &xml, const std::string &path)
void read(XMLReader &xml, const std::string &path, Prop_t &input)
int main(int argc, char **argv)
stag_src_enum stag_src_type
int ks_compute_quark_propagator(LatticeStaggeredFermion &psi, stag_src_type type_of_src, int fuzz_width, multi1d< LatticeColorMatrix > &u, multi1d< LatticeColorMatrix > &u_smr, Handle< const SystemSolver< LatticeStaggeredFermion > > &qprop, XMLFileWriter &xml_out, Real RsdCG, Real Mass, int j_decay, int src_ind, int color_source)
@ GAUGE_INVAR_LOCAL_SOURCE
@ FUZZED_SRC
void ks_compute_baryon(std::string name, LatticeStaggeredPropagator &quark_propagator, XMLFileWriter &xml_out, int j_decay, int tlength)
push(xml_out,"Cooled_Topology")
pop(xml_out)