CHROMA
util_compute_quark_prop_s.cc
Go to the documentation of this file.
1 //
2 // Wrapper code to compute a staggered quark propagtor.
3 //
4 //
5 //
6 
7 #include "handle.h"
8 //#include "actions/ferm/fermbcs/fermbcs.h"
10 #include "meas/hadron/hadron_s.h"
11 #include "meas/smear/fuzz_smear.h"
12 #include "meas/sources/srcfil.h"
14 
16 
17 namespace Chroma {
18 
19  enum func_flag{
22  SINGLETS
23  };
24 
26  /************************************************************************/
27 
29  bool gauge_shift,
30  bool sym_shift, func_flag_type fflag){
31 
32  std::string calling_function;
33  std::string str_source_type;
34  std::string do_sym;
35  std::string do_gauge;
36  std::string more_info;
37 
38  bool problem = false;
39 
40  switch (fflag){
41  case QPROP_FUZZ:
42  calling_function = "compute_quark_propagator_s (fuzzed version)";
43  break;
44  case QPROP_NO_FUZZ:
45  calling_function = "compute_quark_propagator_s (non-fuzzed version)";
46  break;
47  case SINGLETS:
48  calling_function = "compute_singlet_ps";
49  break;
50  default:
51  calling_function = "unknown function";
52  }
53 
54  switch (type_of_src){
55  case LOCAL_SRC:
56  str_source_type="LOCAL_SRC";
57  break;
59  str_source_type="GAUGE_INVAR_LOCAL_SOURCE";
60  break;
61  case FUZZED_SRC:
62  str_source_type="FUZZED_SRC";
63  break;
64  case NOISY_LOCAL_SOURCE:
65  str_source_type="NOISY_LOCAL_SOURCE";
66  break;
67  case LOAD_IN_SOURCE:
68  str_source_type="LOAD_IN_SOURCE";
69  break;
70  default:
71  QDPIO::cerr << "Unknown type of source in" << str_source_type << std::endl;
72  exit (1);
73  }
74 
75  if(gauge_shift){
76  do_gauge = "gauge_shift=true";
77  }else{
78  do_gauge = "gauge_shift=false";
79  }
80 
81  if(sym_shift){
82  do_sym = "sym_shift=true";
83  }else{
84  do_sym = "sym_shift=false";
85  }
86 
87 
88  if( gauge_shift ){
89 
90  // if((type_of_src == LOCAL_SRC) || (type_of_src == FUZZED_SRC)){
91  if(type_of_src == LOCAL_SRC){
92  problem = true;
93  more_info =
94  "Source type not gauge invariant.\nProbably not what you want.";
95  }
96  }else{
97  if (sym_shift){
98  problem = true;
99  more_info =
100  "Symmetric shifts not implemented for non-gauge-invariant sources";
101  }
102  if(type_of_src == GAUGE_INVAR_LOCAL_SOURCE){
103  problem = true;
104  more_info = "GAUGE_INVAR_LOCAL_SOURCE needs gauge shifting";
105  }
106  }
107 
108  if(fflag==QPROP_NO_FUZZ){
109  if(type_of_src == FUZZED_SRC){
110  problem = true;
111  more_info = "Somehow called no-fuzzing version with FUZZED_SRC";
112  }
113  }
114 
115  if(problem){
116  QDPIO::cerr << "In "<< calling_function <<" you used: "<< std::endl;
117  QDPIO::cerr << " "<< str_source_type<< std::endl;
118  QDPIO::cerr << " "<< do_gauge << std::endl;
119  QDPIO::cerr << " "<< do_sym << std::endl;
120  QDPIO::cerr << more_info << std::endl;
121 
122  exit(1);
123  }
124 
125 
126  return 1;
127 
128  }
129 
130 
131  /**************************************************************************/
132 
133  int compute_quark_propagator_s(LatticeStaggeredFermion & psi,
134  stag_src_type type_of_src,
135  bool gauge_shift,
136  bool sym_shift,
137  int fuzz_width,
138  const multi1d<LatticeColorMatrix> & u ,
139  multi1d<LatticeColorMatrix> & u_smr,
141  XMLWriter & xml_out,
142  Real RsdCG, Real Mass,
143  int j_decay,
144  int src_ind, int color_source){
145 
146  LatticeStaggeredFermion q_source ;
147  LatticeStaggeredFermion q_source_fuzz ;
148  int ncg_had = 0 ;
149 
150  static int flag=1;
151 
152  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
153  q_source = zero ;
154 
155  // safety checks
156  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
157  QPROP_FUZZ);
158 
159 
160 
161  if( type_of_src == LOCAL_SRC ){
162  q_source = zero ;
163  multi1d<int> coord(Nd);
164 
165  PropIndexTodelta(src_ind, coord) ;
166  srcfil(q_source, coord,color_source ) ;
167 
168  }else{
169  if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
170  q_source = zero ;
171  multi1d<int> coord(Nd);
172 
173  // start with local source
174  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
175 
176  srcfil(q_source, coord,color_source ) ;
177 
178  // now do the shift
179  PropIndexTodelta(src_ind, coord) ;
180  q_source_fuzz = q_source ;
181 
182  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
183 
184  // sym-shift true for symmetric shifting!!!!!!!
185 
186  }else{
187  if( type_of_src == FUZZED_SRC ){
188 
189  q_source = zero ;
190  multi1d<int> coord(Nd);
191 
192  PropIndexTodelta(src_ind, coord) ;
193  srcfil(q_source, coord,color_source ) ;
194 
195  fuzz_smear(u_smr, q_source,q_source_fuzz, fuzz_width, j_decay) ;
196 
197  q_source = q_source_fuzz ;
198  }
199  }
200  }
201 
202 
203  // Use the last initial guess as the current guess
204 
205  // Compute the propagator for given source color/spin
206  // int n_count;
207 
208  StopWatch swatch;
209  swatch.start();
210 
211  SystemSolverResults_t res = (*qprop)(psi, q_source);
212  swatch.stop();
213  double time_in_sec = swatch.getTimeInSeconds();
214 
215  ncg_had += res.n_count;
216 
217  // this is done for xmldif reasons
218  if( src_ind == 0 ){
219  push(xml_out,"Qprop");
220  write(xml_out, "Staggered_src_tag" , src_ind);
221  write(xml_out, "Mass" , Mass);
222  write(xml_out, "RsdCG", RsdCG);
223  write(xml_out, "n_count", res.n_count);
224  write(xml_out, "time_in_sec",time_in_sec );
225  pop(xml_out);
226  }
227 
228  return ncg_had ;
229  }
230 
231 
232 
233 
234 
235  /**************************************************************************/
236 
237 #if 0
238  int compute_quark_propagator_s(LatticeStaggeredFermion & psi,
239  stag_src_type type_of_src,
240  bool gauge_shift,
241  bool sym_shift,
242  int fuzz_width,
243  const multi1d<LatticeColorMatrix> & u ,
244  multi1d<LatticeColorMatrix> & u_smr,
246  XMLWriter & xml_out,
247  Real RsdCG, Real Mass,
248  int j_decay,
249  int src_ind, int color_source,
250  LatticeStaggeredFermion & q_source_in ){
251 
252  LatticeStaggeredFermion q_source ;
253  LatticeStaggeredFermion q_source_fuzz ;
254  int ncg_had = 0 ;
255 
256  static int flag=1;
257 
258  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
259  q_source = zero ;
260 
261  // safety checks
262  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
263  QPROP_FUZZ);
264 
265 
266 
267  if( type_of_src == LOCAL_SRC ){
268  q_source = zero ;
269  multi1d<int> coord(Nd);
270 
271  PropIndexTodelta(src_ind, coord) ;
272  srcfil(q_source, coord,color_source ) ;
273 
274  }else{
275  if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
276  q_source = zero ;
277  multi1d<int> coord(Nd);
278 
279  // start with local source
280  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
281 
282  srcfil(q_source, coord,color_source ) ;
283 
284  // now do the shift
285  PropIndexTodelta(src_ind, coord) ;
286  q_source_fuzz = q_source ;
287 
288  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
289 
290  // sym-shift true for symmetric shifting!!!!!!!
291 
292  }else{
293  if( type_of_src == FUZZED_SRC ){
294 
295  q_source = zero ;
296  multi1d<int> coord(Nd);
297 
298  PropIndexTodelta(src_ind, coord) ;
299  srcfil(q_source, coord,color_source ) ;
300 
301  fuzz_smear(u_smr, q_source,q_source_fuzz, fuzz_width, j_decay) ;
302 
303  q_source = q_source_fuzz ;
304  }
305  }
306  }
307 
308 
309  if( type_of_src == LOAD_IN_SOURCE ){
310  q_source = q_source_in ;
311  }
312  else
313  {
314  q_source_in = q_source ;
315  }
316 
317 
318 
319 
320  // Use the last initial guess as the current guess
321 
322  // Compute the propagator for given source color/spin
323  // int n_count;
324 
325  StopWatch swatch;
326  swatch.start();
327 
328  SystemSolverResults_t res = (*qprop)(psi, q_source);
329  swatch.stop();
330  double time_in_sec = swatch.getTimeInSeconds();
331 
332  ncg_had += res.n_count;
333 
334  // this is done for xmldif reasons
335  if( src_ind == 0 ){
336  push(xml_out,"Qprop");
337  write(xml_out, "Staggered_src_tag" , src_ind);
338  write(xml_out, "Mass" , Mass);
339  write(xml_out, "RsdCG", RsdCG);
340  write(xml_out, "n_count", res.n_count);
341  write(xml_out, "time_in_sec",time_in_sec );
342  pop(xml_out);
343  }
344 
345  return ncg_had ;
346  }
347 
348 #endif
349 
350  /***************************************************************************/
351 
352  int compute_quark_propagator_s(LatticeStaggeredFermion & psi,
353  stag_src_type type_of_src,
354  bool gauge_shift,
355  bool sym_shift,
356  const multi1d<LatticeColorMatrix> & u ,
358  XMLWriter & xml_out,
359  Real RsdCG, Real Mass,
360  int j_decay,
361  int src_ind, int color_source, int t_source){
362 
363  LatticeStaggeredFermion q_source ;
364  LatticeStaggeredFermion q_source_fuzz ;
365  int ncg_had = 0 ;
366 
367  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
368  q_source = zero ;
369 
370  // safety checks
371  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
372  QPROP_NO_FUZZ);
373 
374 
375  if( type_of_src == LOCAL_SRC ){
376  q_source = zero ;
377  multi1d<int> coord(Nd);
378 
379  PropIndexTodelta(src_ind, coord) ;
380  srcfil(q_source, coord,color_source ) ;
381 
382  }
383  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
384 
385  q_source = zero ;
386  multi1d<int> coord(Nd);
387 
388  // start with local source
389  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
390  coord[j_decay] = t_source ;
391  srcfil(q_source, coord,color_source ) ;
392 
393  // now do the shift
394  PropIndexTodelta(src_ind, coord) ;
395  q_source_fuzz = q_source ;
396 
397  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
398 
399  // sym-shift true for symmetric shifting!!!!!!!
400  }
401  else if( type_of_src == NOISY_LOCAL_SOURCE ) {
402 
403  gaussian_color_src_on_slice(q_source, color_source,t_source, j_decay);
404 
405  }
406  else{
407 
408  QDPIO::cerr << "Conflicting source and shift types in " <<
409  "util_compute_quark_prop_s.cc" <<std::endl;
410  QDPIO::cerr << "double-check your source --- no fuzz-smearing here"
411  << std::endl;
412  exit(0);
413 
414  }
415 
416 
417 
418  // Use the last initial guess as the current guess
419 
420  // Compute the propagator for given source color/spin
421  // int n_count;
422 
423  StopWatch swatch;
424  swatch.start();
425 
426  SystemSolverResults_t res = (*qprop)(psi, q_source);
427  swatch.stop();
428  double time_in_sec = swatch.getTimeInSeconds();
429 
430  ncg_had += res.n_count;
431 
432  // this is done for xmldif reasons
433  if( src_ind == 0 ){
434  push(xml_out,"Qprop");
435  write(xml_out, "Staggered_src_tag" , src_ind);
436  write(xml_out, "Mass" , Mass);
437  write(xml_out, "RsdCG", RsdCG);
438  write(xml_out, "n_count", res.n_count);
439  write(xml_out, "time_in_sec",time_in_sec );
440  pop(xml_out);
441  }
442 
443  return ncg_had ;
444  }
445 
446 
447 
448 
449  int compute_quark_propagator_s(LatticeStaggeredFermion & psi,
450  stag_src_type type_of_src,
451  bool gauge_shift,
452  bool sym_shift,
453  const multi1d<LatticeColorMatrix> & u ,
455  XMLWriter & xml_out,
456  Real RsdCG, Real Mass,
457  int j_decay,
458  int src_ind, int color_source, int t_source,
459  LatticeStaggeredFermion & q_source_in ){
460 
461  LatticeStaggeredFermion q_source ;
462  LatticeStaggeredFermion q_source_fuzz ;
463  int ncg_had = 0 ;
464 
465  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
466  q_source = zero ;
467 
468  // safety checks
469  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
470  QPROP_NO_FUZZ);
471 
472 
473  if( type_of_src == LOCAL_SRC ){
474  q_source = zero ;
475  multi1d<int> coord(Nd);
476 
477  PropIndexTodelta(src_ind, coord) ;
478  srcfil(q_source, coord,color_source ) ;
479 
480  }
481  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
482 
483  q_source = zero ;
484  multi1d<int> coord(Nd);
485 
486  // start with local source
487  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
488  coord[j_decay] = t_source ;
489  srcfil(q_source, coord,color_source ) ;
490 
491  // now do the shift
492  PropIndexTodelta(src_ind, coord) ;
493  q_source_fuzz = q_source ;
494 
495  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
496 
497  // sym-shift true for symmetric shifting!!!!!!!
498  }
499  else if( type_of_src == NOISY_LOCAL_SOURCE ) {
500 
501  gaussian_color_src_on_slice(q_source, color_source,t_source, j_decay);
502 
503  }
504  else if( type_of_src == LOAD_IN_SOURCE ){
505  q_source = q_source_in ;
506  }
507  else{
508 
509  QDPIO::cerr << "Conflicting source and shift types in " <<
510  "util_compute_quark_prop_s.cc" <<std::endl;
511  QDPIO::cerr << "double-check your source --- no fuzz-smearing here"
512  << std::endl;
513  QDPIO::cout << "DEBUG type_of_src = " << type_of_src << std::endl;
514  exit(0);
515 
516  }
517 
518 
519  if( type_of_src != LOAD_IN_SOURCE )
520  {
521  q_source_in = q_source ;
522  }
523 
524 
525 
526  // Use the last initial guess as the current guess
527 
528  // Compute the propagator for given source color/spin
529  // int n_count;
530 
531  StopWatch swatch;
532  swatch.start();
533 
534  SystemSolverResults_t res = (*qprop)(psi, q_source);
535  swatch.stop();
536  double time_in_sec = swatch.getTimeInSeconds();
537 
538  ncg_had += res.n_count;
539 
540  // this is done for xmldif reasons
541  if( src_ind == 0 ){
542  push(xml_out,"Qprop");
543  write(xml_out, "Staggered_src_tag" , src_ind);
544  write(xml_out, "Mass" , Mass);
545  write(xml_out, "RsdCG", RsdCG);
546  write(xml_out, "n_count", res.n_count);
547  write(xml_out, "time_in_sec",time_in_sec );
548  pop(xml_out);
549  }
550 
551  return ncg_had ;
552  }
553 
554 
555 
556 
557 
558  /**
559  For non-generate inversion I need two quark propagators from the same
560  source.
561 
562  **/
563 
564 
565  int compute_quark_propagator_s(LatticeStaggeredFermion & psi1,
566  LatticeStaggeredFermion & psi2,
567  stag_src_type type_of_src,
568  bool gauge_shift,
569  bool sym_shift,
570  const multi1d<LatticeColorMatrix> & u ,
573  XMLWriter & xml_out,
574  Real RsdCG, Real Mass1, Real Mass2,
575  int j_decay,
576  int src_ind, int color_source, int t_source,
577  LatticeStaggeredFermion & q_source_in){
578 
579  LatticeStaggeredFermion q_source ;
580  LatticeStaggeredFermion q_source_fuzz ;
581  int ncg_had = 0 ;
582  std::string src_tag ;
583 
584  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
585  q_source = zero ;
586 
587  // safety checks
588  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
589  QPROP_NO_FUZZ);
590 
591 
592  if( type_of_src == LOCAL_SRC ){
593  q_source = zero ;
594  multi1d<int> coord(Nd);
595 
596  PropIndexTodelta(src_ind, coord) ;
597  srcfil(q_source, coord,color_source ) ;
598  src_tag = "LOCAL_SRC" ;
599  }
600  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
601 
602  q_source = zero ;
603  multi1d<int> coord(Nd);
604 
605  // start with local source
606  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
607  coord[j_decay] = t_source ;
608  srcfil(q_source, coord,color_source ) ;
609 
610  // now do the shift
611  PropIndexTodelta(src_ind, coord) ;
612  q_source_fuzz = q_source ;
613 
614  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
615 
616  // sym-shift true for symmetric shifting!!!!!!!
617  src_tag = "GAUGE_INVAR_LOCAL_SOURCE" ;
618  }
619  else if( type_of_src == NOISY_LOCAL_SOURCE ) {
620 
621  gaussian_color_src_on_slice(q_source, color_source,t_source, j_decay);
622  src_tag = "NOISY_LOCAL_SOURCE" ;
623  }
624  else if( type_of_src == LOAD_IN_SOURCE ){
625  q_source = q_source_in ;
626  }
627 
628  else{
629  src_tag = "SOURCE_ERROR" ;
630  QDPIO::cerr << "Conflicting source and shift types in " <<
631  "util_compute_quark_prop_s.cc" <<std::endl;
632  QDPIO::cerr << "double-check your source --- no fuzz-smearing here"
633  << std::endl;
634  QDPIO::cout << "DEBUG type_of_src = " << type_of_src << std::endl;
635  exit(0);
636 
637  }
638 
639 
640 
641  if( type_of_src != LOAD_IN_SOURCE )
642  {
643  q_source_in = q_source ;
644  }
645 
646 
647  // Use the last initial guess as the current guess
648 
649  // Compute the propagator for given source color/spin
650  // int n_count;
651 
652  StopWatch swatch;
653  swatch.start();
654 
655  SystemSolverResults_t res1 = (*qprop1)(psi1, q_source);
656  SystemSolverResults_t res2 = (*qprop2)(psi2, q_source);
657 
658  swatch.stop();
659  double time_in_sec = swatch.getTimeInSeconds();
660 
661  ncg_had += res1.n_count;
662  ncg_had += res2.n_count;
663 
664  // this is done for xmldif reasons
665  if( src_ind == 0 ){
666  push(xml_out,"inversions");
667  push(xml_out,"Qprop1");
668  write(xml_out, "Staggered_src_tag" , src_tag);
669  write(xml_out, "Mass" , Mass1);
670  write(xml_out, "Final_RsdCG", res1.resid);
671  write(xml_out, "n_count", res1.n_count);
672  pop(xml_out);
673 
674  push(xml_out,"Qprop2");
675  write(xml_out, "Staggered_src_tag" , src_tag);
676  write(xml_out, "Mass" , Mass2);
677  write(xml_out, "Final_RsdCG", res2.resid);
678  write(xml_out, "n_count", res2.n_count);
679  pop(xml_out);
680 
681  write(xml_out, "time_in_sec",time_in_sec );
682  pop(xml_out);
683  }
684 
685  return ncg_had ;
686  }
687 
688 
689 
690  /**
691  For non-degenerate inversion I need two quark propagators from the same
692  source.
693 
694  **/
695 
696 
697  int compute_quark_propagator_s(LatticeStaggeredFermion & psi1,
698  LatticeStaggeredFermion & psi2,
699  stag_src_type type_of_src,
700  bool gauge_shift,
701  bool sym_shift,
702  const multi1d<LatticeColorMatrix> & u ,
705  XMLWriter & xml_out,
706  Real RsdCG, Real Mass1, Real Mass2,
707  int j_decay,
708  int src_ind, int color_source, int t_source){
709 
710  LatticeStaggeredFermion q_source ;
711  LatticeStaggeredFermion q_source_fuzz ;
712  int ncg_had = 0 ;
713  std::string src_tag ;
714 
715  QDPIO::cout << "Inversion for Color = " << color_source << std::endl;
716  q_source = zero ;
717 
718  // safety checks
719  check_qprop_source_compatability(type_of_src, gauge_shift, sym_shift,
720  QPROP_NO_FUZZ);
721 
722 
723  if( type_of_src == LOCAL_SRC ){
724  q_source = zero ;
725  multi1d<int> coord(Nd);
726 
727  PropIndexTodelta(src_ind, coord) ;
728  srcfil(q_source, coord,color_source ) ;
729  src_tag = "LOCAL_SRC" ;
730  }
731  else if( type_of_src == GAUGE_INVAR_LOCAL_SOURCE ) {
732 
733  q_source = zero ;
734  multi1d<int> coord(Nd);
735 
736  // start with local source
737  coord[0]=0; coord[1] = 0; coord[2] = 0; coord[3] = 0;
738  coord[j_decay] = t_source ;
739  srcfil(q_source, coord,color_source ) ;
740 
741  // now do the shift
742  PropIndexTodelta(src_ind, coord) ;
743  q_source_fuzz = q_source ;
744 
745  q_source = shiftDeltaPropCov(coord, q_source_fuzz, u, sym_shift);
746 
747  // sym-shift true for symmetric shifting!!!!!!!
748  src_tag = "GAUGE_INVAR_LOCAL_SOURCE" ;
749  }
750  else if( type_of_src == NOISY_LOCAL_SOURCE ) {
751 
752  gaussian_color_src_on_slice(q_source, color_source,t_source, j_decay);
753  src_tag = "NOISY_LOCAL_SOURCE" ;
754  }
755  else{
756  src_tag = "SOURCE_ERROR" ;
757  QDPIO::cerr << "Conflicting source and shift types in " <<
758  "util_compute_quark_prop_s.cc" <<std::endl;
759  QDPIO::cerr << "double-check your source --- no fuzz-smearing here"
760  << std::endl;
761  exit(0);
762 
763  }
764 
765 
766 
767  // Use the last initial guess as the current guess
768 
769  // Compute the propagator for given source color/spin
770  // int n_count;
771 
772  StopWatch swatch;
773  swatch.start();
774 
775  SystemSolverResults_t res1 = (*qprop1)(psi1, q_source);
776  SystemSolverResults_t res2 = (*qprop2)(psi2, q_source);
777 
778  swatch.stop();
779  double time_in_sec = swatch.getTimeInSeconds();
780 
781  ncg_had += res1.n_count;
782  ncg_had += res2.n_count;
783 
784  // this is done for xmldif reasons
785  if( src_ind == 0 ){
786  push(xml_out,"inversions");
787  push(xml_out,"Qprop1");
788  write(xml_out, "Staggered_src_tag" , src_tag);
789  write(xml_out, "Mass" , Mass1);
790  write(xml_out, "Final_RsdCG", res1.resid);
791  write(xml_out, "n_count", res1.n_count);
792  pop(xml_out);
793 
794  push(xml_out,"Qprop2");
795  write(xml_out, "Staggered_src_tag" , src_tag);
796  write(xml_out, "Mass" , Mass2);
797  write(xml_out, "Final_RsdCG", res2.resid);
798  write(xml_out, "n_count", res2.n_count);
799  pop(xml_out);
800 
801  write(xml_out, "time_in_sec",time_in_sec );
802  pop(xml_out);
803  }
804 
805  return ncg_had ;
806  }
807 
808 
809 
810 
811 
812 } // end of namespace
Class for counted reference semantics.
Definition: handle.h:33
Dilute Gaussian sources.
Fermion actions.
Fuzzed sources.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
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 gaussian_color_src_on_slice(LatticeStaggeredFermion &a, int color_index, int slice, int mu)
Diluted Gauusian-source.
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
Hadronic observables.
Class for counted reference semantics.
multi1d< int > coord(Nd)
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > enum InvType invType const multi1d< Real > & RsdCG
Definition: pbg5p_w.cc:30
int check_qprop_source_compatability(stag_src_type type_of_src, bool gauge_shift, bool sym_shift, func_flag_type fflag)
static multi1d< LatticeColorMatrix > u
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > & Mass
Definition: pbg5p_w.cc:29
push(xml_out,"Condensates")
LatticeStaggeredPropagator shiftDeltaPropCov(multi1d< int > &delta, const LatticeStaggeredPropagator &src, multi1d< LatticeColorMatrix > u, bool sym_flag)
func_flag func_flag_type
LatticeFermion psi
Definition: mespbg5p_w.cc:35
pop(xml_out)
void PropIndexTodelta(int src_index, multi1d< int > &delta)
int compute_quark_propagator_s(LatticeStaggeredFermion &psi, stag_src_type type_of_src, bool gauge_shift, bool sym_shift, int fuzz_width, const multi1d< LatticeColorMatrix > &u, multi1d< LatticeColorMatrix > &u_smr, Handle< SystemSolver< LatticeStaggeredFermion > > &qprop, XMLWriter &xml_out, Real RsdCG, Real Mass, int j_decay, int src_ind, int color_source)
Double zero
Definition: invbicg.cc:106
::std::string string
Definition: gtest.h:1979
Point source construction.
Holds return info from SystemSolver call.
Definition: syssolver.h:17
Compute staggered quark propagator.
@ GAUGE_INVAR_LOCAL_SOURCE
@ NOISY_LOCAL_SOURCE