CHROMA
inline_spectrum_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Inline construction of spectrum
3  *
4  * Spectrum calculations
5  */
6 
7 #error "THIS ROUTINE IS OBSOLETE"
8 
11 #include "meas/glue/mesplq.h"
12 #include "meas/smear/ape_smear.h"
13 #include "meas/smear/sink_smear2.h"
14 #include "util/ft/sftmom.h"
15 #include "util/info/proginfo.h"
16 #include "io/param_io.h"
17 #include "io/qprop_io.h"
18 #include "meas/hadron/mesons_w.h"
19 #include "meas/hadron/baryon_w.h"
20 #include "meas/hadron/hybmeson_w.h"
21 #include "meas/hadron/curcor2_w.h"
23 #include "meas/glue/mesfield.h"
24 #include "util/gauge/taproj.h"
26 
28 
29 namespace Chroma
30 {
31  namespace InlineSpectrumEnv
32  {
33  namespace
34  {
35  AbsInlineMeasurement* createMeasurement(XMLReader& xml_in,
36  const std::string& path)
37  {
38  return new InlineSpectrum(InlineSpectrumParams(xml_in, path));
39  }
40 
41  //! Local registration flag
42  bool registered = false;
43  }
44 
45  const std::string name = "SPECTRUM";
46 
47  //! Register all the factories
48  bool registerAll()
49  {
50  bool success = true;
51  if (! registered)
52  {
53  success &= TheInlineMeasurementFactory::Instance().registerObject(name, createMeasurement);
54  registered = true;
55  }
56  return success;
57  }
58  }
59 
60 
61 
62  //! Reader for parameters
63  void read(XMLReader& xml, const std::string& path, InlineSpectrumParams::Param_t& param)
64  {
65  XMLReader paramtop(xml, path);
66 
67  int version;
68  read(paramtop, "version", version);
69 
70  param.HybMesP = false;
71  param.link_smear_fact = 0;
72  param.link_smear_num = 0;
73 
74  param.BlkMax = 100;
75  param.BlkAccu = 1.0e-5;
76 
77  switch (version)
78  {
79  case 9:
80  param.Wl_snk = false;
81  break;
82 
83  case 10:
84  read(paramtop, "Wl_snk", param.Wl_snk);
85  break;
86 
87  case 11:
88  read(paramtop, "Wl_snk", param.Wl_snk);
89  read(paramtop, "HybMesP", param.HybMesP);
90  break;
91 
92  case 12:
93  read(paramtop, "Wl_snk", param.Wl_snk);
94  read(paramtop, "HybMesP", param.HybMesP);
95  read(paramtop, "link_smear_fact", param.link_smear_fact);
96  read(paramtop, "link_smear_num", param.link_smear_num);
97  break;
98 
99  case 13:
100  read(paramtop, "Wl_snk", param.Wl_snk);
101  read(paramtop, "HybMesP", param.HybMesP);
102  read(paramtop, "link_smear_fact", param.link_smear_fact);
103  read(paramtop, "link_smear_num", param.link_smear_num);
104  read(paramtop, "BlkMax", param.BlkMax);
105  read(paramtop, "BlkAccu", param.BlkAccu);
106  break;
107 
108  default:
109  QDPIO::cerr << "Input parameter version " << version << " unsupported." << std::endl;
110  QDP_abort(1);
111  }
112 
113  if (paramtop.count("HybMesP") != 0)
114  {
115  // Must read f_mu-nu smearing params
116  read(paramtop, "fact_sm", param.fact_sm);
117  read(paramtop, "numb_sm", param.numb_sm);
118  }
119  else
120  {
121  param.fact_sm = zero;
122  param.numb_sm = 0;
123  }
124 
125  read(paramtop, "Pt_snk", param.Pt_snk);
126  read(paramtop, "Sl_snk", param.Sl_snk);
127 
128  read(paramtop, "MesonP", param.MesonP);
129  read(paramtop, "CurrentP", param.CurrentP);
130  read(paramtop, "BaryonP", param.BaryonP);
131  read(paramtop, "time_rev", param.time_rev);
132 
133  read(paramtop, "mom2_max", param.mom2_max);
134  read(paramtop, "avg_equiv_mom", param.avg_equiv_mom);
135 
136  read(paramtop, "wvf_kind", param.wvf_kind);
137  read(paramtop, "wvf_param", param.wvf_param);
138  read(paramtop, "wvfIntPar", param.wvfIntPar);
139 
140  if (param.wvf_param.size() != param.wvfIntPar.size())
141  {
142  QDPIO::cerr << "wvf_param size inconsistent with wvfintpar size" << std::endl;
143  QDP_abort(1);
144  }
145  }
146 
147 
148  //! Writer for parameters
149  void write(XMLWriter& xml, const std::string& path, const InlineSpectrumParams::Param_t& param)
150  {
151  push(xml, path);
152 
153  int version = 13;
154  write(xml, "version", version);
155 
156  write(xml, "Pt_snk", param.Pt_snk);
157  write(xml, "Sl_snk", param.Sl_snk);
158  write(xml, "Wl_snk", param.Wl_snk);
159 
160  write(xml, "MesonP", param.MesonP);
161  write(xml, "CurrentP", param.CurrentP);
162  write(xml, "BaryonP", param.BaryonP);
163  write(xml, "HybMesP", param.HybMesP);
164 
165  if (param.HybMesP)
166  {
167  // Must write f_mu-nu smearing params
168  write(xml, "fact_sm", param.fact_sm);
169  write(xml, "numb_sm", param.numb_sm);
170  }
171 
172  write(xml, "time_rev", param.time_rev);
173 
174  write(xml, "mom2_max", param.mom2_max);
175  write(xml, "avg_equiv_mom", param.avg_equiv_mom);
176 
177  write(xml, "wvf_kind", param.wvf_kind);
178  write(xml, "wvf_param", param.wvf_param);
179  write(xml, "wvfIntPar", param.wvfIntPar);
180 
181  write(xml, "link_smear_fact", param.link_smear_fact);
182  write(xml, "link_smear_num", param.link_smear_num);
183  write(xml, "BlkMax", param.BlkMax);
184  write(xml, "BlkAccu", param.BlkAccu);
185 
186  write(xml, "nrow", Layout::lattSize());
187 
188  pop(xml);
189  }
190 
191 
192  //! Propagator input
193  void read(XMLReader& xml, const std::string& path, InlineSpectrumParams::NamedObject_t& input)
194  {
195  XMLReader inputtop(xml, path);
196 
197  read(inputtop, "gauge_id", input.gauge_id);
198  read(inputtop, "prop_ids", input.prop_ids);
199  }
200 
201  //! Propagator output
202  void write(XMLWriter& xml, const std::string& path, const InlineSpectrumParams::NamedObject_t& input)
203  {
204  push(xml, path);
205 
206  write(xml, "gauge_id", input.gauge_id);
207  write(xml, "prop_ids", input.prop_ids);
208 
209  pop(xml);
210  }
211 
212 
213  // Param stuff
215 
217  {
218  try
219  {
220  XMLReader paramtop(xml_in, path);
221 
222  if (paramtop.count("Frequency") == 1)
223  read(paramtop, "Frequency", frequency);
224  else
225  frequency = 1;
226 
227  // Parameters for source construction
228  read(paramtop, "Param", param);
229 
230  // Read in the output propagator/source configuration info
231  read(paramtop, "NamedObject", named_obj);
232 
233  // Possible alternate XML file pattern
234  if (paramtop.count("xml_file") != 0)
235  {
236  read(paramtop, "xml_file", xml_file);
237  }
238  }
239  catch(const std::string& e)
240  {
241  QDPIO::cerr << __func__ << ": Caught Exception reading XML: " << e << std::endl;
242  QDP_abort(1);
243  }
244  }
245 
246 
247  void
248  InlineSpectrumParams::write(XMLWriter& xml_out, const std::string& path)
249  {
250  push(xml_out, path);
251 
252  Chroma::write(xml_out, "Param", param);
253  Chroma::write(xml_out, "NamedObject", named_obj);
254  QDP::write(xml_out, "xml_file", xml_file);
255 
256  pop(xml_out);
257  }
258 
259 
260  // Function call
261  void
262  InlineSpectrum::operator()(unsigned long update_no,
263  XMLWriter& xml_out)
264  {
265  // If xml file not empty, then use alternate
266  if (params.xml_file != "")
267  {
268  std::string xml_file = makeXMLFileName(params.xml_file, update_no);
269 
270  push(xml_out, "spectrum_w");
271  write(xml_out, "update_no", update_no);
272  write(xml_out, "xml_file", xml_file);
273  pop(xml_out);
274 
275  XMLFileWriter xml(xml_file);
276  func(update_no, xml);
277  }
278  else
279  {
280  func(update_no, xml_out);
281  }
282  }
283 
284 
285  // Real work done here
286  void
287  InlineSpectrum::func(unsigned long update_no,
288  XMLWriter& xml_out)
289  {
290  START_CODE();
291 
292  StopWatch snoop;
293  snoop.reset();
294  snoop.start();
295 
296  // Test and grab a reference to the gauge field
297  XMLBufferWriter gauge_xml;
298  try
299  {
300  TheNamedObjMap::Instance().getData< multi1d<LatticeColorMatrix> >(params.named_obj.gauge_id);
301  TheNamedObjMap::Instance().get(params.named_obj.gauge_id).getRecordXML(gauge_xml);
302  }
303  catch( std::bad_cast )
304  {
305  QDPIO::cerr << InlineSpectrumEnv::name << ": caught dynamic cast error"
306  << std::endl;
307  QDP_abort(1);
308  }
309  catch (const std::string& e)
310  {
311  QDPIO::cerr << InlineSpectrumEnv::name << ": std::map call failed: " << e
312  << std::endl;
313  QDP_abort(1);
314  }
315  const multi1d<LatticeColorMatrix>& u =
316  TheNamedObjMap::Instance().getData< multi1d<LatticeColorMatrix> >(params.named_obj.gauge_id);
317 
318  push(xml_out, "spectrum_w");
319  write(xml_out, "update_no", update_no);
320 
321  QDPIO::cout << InlineSpectrumEnv::name << ": Spectroscopy for Wilson-like fermions" << std::endl;
322  StopWatch swatch;
323 
324  /*
325  * Sanity checks
326  */
327  if (params.param.wvf_param.size() != params.named_obj.prop_ids.size())
328  {
329  QDPIO::cerr << "wvf_param size inconsistent with prop_ids size" << std::endl;
330  QDP_abort(1);
331  }
332 
333  QDPIO::cout << std::endl << " Gauge group: SU(" << Nc << ")" << std::endl;
334 
335  QDPIO::cout << " volume: " << Layout::lattSize()[0];
336  for (int i=1; i<Nd; ++i) {
337  QDPIO::cout << " x " << Layout::lattSize()[i];
338  }
339  QDPIO::cout << std::endl;
340 
341  proginfo(xml_out); // Print out basic program info
342 
343  // Write out the input
344  params.write(xml_out, "Input");
345 
346  // Write out the config info
347  write(xml_out, "Config_info", gauge_xml);
348 
349  push(xml_out, "Output_version");
350  write(xml_out, "out_version", 13);
351  pop(xml_out);
352 
353 
354  // First calculate some gauge invariant observables just for info.
355  MesPlq(xml_out, "Observables", u);
356 
357  // Keep an array of all the xml output buffers
358  XMLArrayWriter xml_array(xml_out,params.named_obj.prop_ids.size());
359  push(xml_array, "Wilson_hadron_measurements");
360 
361 
362  // Now loop over the various fermion masses
363  for (int loop=0; loop < params.named_obj.prop_ids.size(); ++loop)
364  {
365  // Read the quark propagator and extract headers
367  PropSourceConst_t source_header;
368  QDPIO::cout << "Attempt to read propagator info" << std::endl;
369  try
370  {
371  // Try the cast to see if this is a valid source
372  LatticePropagator& prop_tmp =
373  TheNamedObjMap::Instance().getData<LatticePropagator>(params.named_obj.prop_ids[loop]);
374 
375  // Snarf the source info. This is will throw if the source_id is not there
376  XMLReader prop_file_xml, prop_record_xml;
377  TheNamedObjMap::Instance().get(params.named_obj.prop_ids[loop]).getFileXML(prop_file_xml);
378  TheNamedObjMap::Instance().get(params.named_obj.prop_ids[loop]).getRecordXML(prop_record_xml);
379 
380  // Try to invert this record XML into a ChromaProp struct
381  // Also pull out the id of this source
382  {
383  read(prop_record_xml, "/Propagator/ForwardProp", prop_header);
384  read(prop_record_xml, "/Propagator/PropSource", source_header);
385  }
386  }
387  catch (std::bad_cast)
388  {
389  QDPIO::cerr << InlineSpectrumEnv::name << ": caught dynamic cast error"
390  << std::endl;
391  QDP_abort(1);
392  }
393  catch (const std::string& e)
394  {
395  QDPIO::cerr << InlineSpectrumEnv::name << ": error extracting prop_header: " << e << std::endl;
396  QDP_abort(1);
397  }
398 
399  // Should be a valid cast now
400  const LatticePropagator& quark_propagator =
401  TheNamedObjMap::Instance().getData<LatticePropagator>(params.named_obj.prop_ids[loop]);
402 
403  QDPIO::cout << "Propagator successfully read and parsed" << std::endl;
404 
405  // Derived from input prop
406  multi1d<int> t_srce = source_header.getTSrce();
407  int j_decay = source_header.j_decay;
408  int t0 = source_header.t_source;
409  multi1d<int> boundary = getFermActBoundary(prop_header.fermact);
410 
411  // Hunt around to find the mass
412  // NOTE: this may be problematic in the future if actions are used with no
413  // clear def. of a Mass
414  QDPIO::cout << "Try action and mass" << std::endl;
415  Real Mass = getMass(prop_header.fermact);
416 
417  QDPIO::cout << "FermAct = " << prop_header.fermact.id << std::endl;
418  QDPIO::cout << "Mass = " << Mass << std::endl;
419 
420  // Flags
421  int bc_spec = boundary[j_decay];
422 
423  // Initialize the slow Fourier transform phases
425  j_decay);
426 
427  // Keep a copy of the phases with NO momenta
428  SftMom phases_nomom(0, true, j_decay);
429 
430  // Next array element - name auto-written
431  push(xml_array);
432  write(xml_array, "loop", loop);
433  write(xml_array, "Mass_mes", Mass);
434  write(xml_array, "t0", t0);
435 
436  // Save prop input
437  write(xml_array, "ForwardProp", prop_header);
438  write(xml_array, "PropSource", source_header);
439 
440  // Sanity check - write out the norm2 of the forward prop in the j_decay direction
441  // Use this for any possible verification
442  {
443  multi1d<Double> forward_prop_corr = sumMulti(localNorm2(quark_propagator),
444  phases.getSet());
445 
446  push(xml_array, "Forward_prop_correlator");
447  write(xml_array, "forward_prop_corr", forward_prop_corr);
448  pop(xml_array);
449  }
450 
451  // Determine what kind of source to use
452  bool Pt_src = false;
453  bool Sl_src = false;
454  bool Wl_src = false;
455 
456  if (source_header.source.id == "POINT_SOURCE")
457  Pt_src = true;
458  else if (source_header.source.id == "SHELL_SOURCE")
459  Sl_src = true;
460  else if (source_header.source.id == "WALL_SOURCE")
461  Wl_src = true;
462  else
463  {
464  QDPIO::cerr << "Unsupported source type" << std::endl;
465  QDP_abort(1);
466  }
467 
468 
469  /*
470  * Smear the gauge field if needed
471  */
472  multi1d<LatticeColorMatrix> u_link_smr(Nd);
473  u_link_smr = u;
474 
476  {
477  for(int i=0; i < params.param.link_smear_num; ++i)
478  {
479  multi1d<LatticeColorMatrix> u_tmp(Nd);
480 
481  for(int mu = 0; mu < Nd; ++mu)
482  if ( mu != j_decay )
483  APE_Smear(u_link_smr, u_tmp[mu], mu, 0,
486  j_decay);
487  else
488  u_tmp[mu] = u_link_smr[mu];
489 
490  u_link_smr = u_tmp;
491  }
492  QDPIO::cout << "Gauge field APE-smeared!" << std::endl;
493  }
494 
495 
496  //
497  // Do the mesons first
498  //
499  if (params.param.MesonP)
500  {
501  swatch.reset();
502  swatch.start();
503 
504  // Construct {Point|Shell}-Point mesons, if desired
505  if (params.param.Pt_snk)
506  {
507  if (Pt_src)
508  mesons(quark_propagator, quark_propagator, phases, t0,
509  xml_array, "Point_Point_Wilson_Mesons");
510 
511  if (Sl_src)
512  mesons(quark_propagator, quark_propagator, phases, t0,
513  xml_array, "Shell_Point_Wilson_Mesons");
514 
515  if (Wl_src)
516  mesons(quark_propagator, quark_propagator, phases_nomom, t0,
517  xml_array, "Wall_Point_Wilson_Mesons");
518  } // end if (Pt_snk)
519 
520  // Convolute the quark propagator with the sink smearing function.
521  // Make a copy of the quark propagator and then overwrite it with
522  // the convolution.
523  if (params.param.Sl_snk)
524  {
525  LatticePropagator quark_prop_smr;
526  quark_prop_smr = quark_propagator;
527  sink_smear2(u_link_smr, quark_prop_smr,
529  params.param.wvf_param[loop],
530  params.param.wvfIntPar[loop],
531  j_decay);
532 
533  if (Pt_src)
534  mesons(quark_prop_smr, quark_prop_smr, phases, t0,
535  xml_array, "Point_Shell_Wilson_Mesons");
536 
537  if (Sl_src)
538  mesons(quark_prop_smr, quark_prop_smr, phases, t0,
539  xml_array, "Shell_Shell_Wilson_Mesons");
540 
541  if (Wl_src)
542  mesons(quark_prop_smr, quark_prop_smr, phases_nomom, t0,
543  xml_array, "Wall_Shell_Wilson_Mesons");
544  } // end if (Sl_snk)
545 
546  // Wall sink
547  if (params.param.Wl_snk)
548  {
549  LatticePropagator wall_quark_prop;
550  wall_qprop(wall_quark_prop, quark_propagator, phases_nomom);
551 
552  if (Pt_src)
553  mesons(wall_quark_prop, wall_quark_prop, phases_nomom, t0,
554  xml_array, "Point_Wall_Wilson_Mesons");
555 
556  if (Sl_src)
557  mesons(wall_quark_prop, wall_quark_prop, phases_nomom, t0,
558  xml_array, "Shell_Wall_Wilson_Mesons");
559 
560  if (Wl_src)
561  mesons(wall_quark_prop, wall_quark_prop, phases_nomom, t0,
562  xml_array, "Wall_Wall_Wilson_Mesons");
563  } // end if (Wl_snk)
564 
565  swatch.stop();
566  QDPIO::cout << InlineSpectrumEnv::name << ": mesons computed: time= "
567  << swatch.getTimeInSeconds()
568  << " secs" << std::endl;
569  } // end if (MesonP)
570 
571 
572  // Next do the hybrid mesons
573  if (params.param.HybMesP)
574  {
575  swatch.reset();
576  swatch.start();
577 
578  /* Smear the gauge fields to construct smeared E- and B-fields */
579  int BlkMax = params.param.BlkMax;
580  Real BlkAccu = params.param.BlkAccu;
581  BlkAccu *= 0.01;
582  multi1d<LatticeColorMatrix> f;
583  multi1d<LatticeColorMatrix> u_smr = u;
584  multi1d<LatticeColorMatrix> u_tmp(Nd);
585 
586  for(int i=0; i < params.param.numb_sm; ++i)
587  {
588  for(int mu = 0; mu < Nd; ++mu)
589  {
590  // Smear all directions, including time
591  APE_Smear(u_smr, u_tmp[mu], mu, 0,
592  params.param.fact_sm, BlkAccu, BlkMax,
593  j_decay);
594  }
595 
596  u_smr = u_tmp;
597  }
598 
599  mesField(f, u_smr); // compute F_munu fields
600 
601  // Make traceless (is already anti-hermitian)
602  for(int i = 0; i < f.size(); ++i) {
603  taproj(f[i]);
604  }
605 
606  // Construct {Point|Shell}-Point hybrid mesons, if desired
607  if (params.param.Pt_snk)
608  {
609  multi1d<int> t_srce = source_header.getTSrce();
610 
611  if (Pt_src)
612  hybmeson(f, u_smr, quark_propagator, quark_propagator, phases, t_srce,
613  xml_array, "Point_Point_Wilson_Hybrid_Mesons");
614 
615  if (Sl_src)
616  hybmeson(f, u_smr, quark_propagator, quark_propagator, phases, t_srce,
617  xml_array, "Shell_Point_Wilson_Hybrid_Mesons");
618 
619  if (Wl_src)
620  QDP_error_exit("Wall-source hybrid mesons not supported");
621 
622  } // end if (Pt_snk)
623 
624  // Convolute the quark propagator with the sink smearing function.
625  // Make a copy of the quark propagator and then overwrite it with
626  // the convolution.
627  if (params.param.Sl_snk)
628  {
629  LatticePropagator quark_prop_smr;
630  quark_prop_smr = quark_propagator;
631  sink_smear2(u_link_smr, quark_prop_smr,
633  params.param.wvf_param[loop],
634  params.param.wvfIntPar[loop],
635  j_decay);
636 
637  multi1d<int> t_srce = source_header.getTSrce();
638  if (Pt_src)
639  hybmeson(f, u_smr, quark_prop_smr, quark_prop_smr, phases, t_srce,
640  xml_array, "Point_Shell_Wilson_Hybrid_Mesons");
641 
642  if (Sl_src)
643  hybmeson(f, u_smr, quark_prop_smr, quark_prop_smr, phases, t_srce,
644  xml_array, "Shell_Shell_Wilson_Hybrid_Mesons");
645 
646  if (Wl_src)
647  QDP_error_exit("Wall-source hybrid mesons not supported");
648  } // end if (Sl_snk)
649 
650  // Wall sink
651  if (params.param.Wl_snk)
652  {
653  QDP_error_exit("Wall-sink not supported in hybrid mesons");
654  } // end if (Wl_snk)
655 
656  swatch.stop();
657  QDPIO::cout << InlineSpectrumEnv::name << ": hybrid mesons computed: time= "
658  << swatch.getTimeInSeconds()
659  << " secs" << std::endl;
660  } // end if (HybMesP)
661 
662 
663 
664  // Do the currents next
665  if (params.param.CurrentP)
666  {
667  swatch.reset();
668  swatch.start();
669 
670  // Construct the rho std::vector-current and the pion axial current divergence
671  if (Pt_src)
672  curcor2(u, quark_propagator, quark_propagator, phases,
673  t0, 3,
674  xml_array, "Point_Point_Meson_Currents");
675 
676  if (Sl_src)
677  curcor2(u, quark_propagator, quark_propagator, phases,
678  t0, 3,
679  xml_array, "Shell_Point_Meson_Currents");
680 
681  if (Wl_src)
682  curcor2(u, quark_propagator, quark_propagator, phases_nomom,
683  t0, 3,
684  xml_array, "Wall_Point_Meson_Currents");
685 
686  swatch.stop();
687  QDPIO::cout << InlineSpectrumEnv::name << ": currents computed: time= "
688  << swatch.getTimeInSeconds()
689  << " secs" << std::endl;
690  } // end if (CurrentP)
691 
692 
693  // Do the baryons
694  if (params.param.BaryonP)
695  {
696  swatch.reset();
697  swatch.start();
698 
699  // Construct {Point|Shell}-Point mesons, if desired
700  if (params.param.Pt_snk)
701  {
702  if (Pt_src)
703  baryon(quark_propagator, phases,
705  xml_array, "Point_Point_Wilson_Baryons");
706 
707  if (Sl_src)
708  baryon(quark_propagator, phases,
710  xml_array, "Shell_Point_Wilson_Baryons");
711 
712  if (Wl_src)
713  baryon(quark_propagator, phases_nomom,
715  xml_array, "Wall_Point_Wilson_Baryons");
716  } // end if (Pt_snk)
717 
718  // Convolute the quark propagator with the sink smearing function.
719  // Make a copy of the quark propagator and then overwrite it with
720  // the convolution.
721  if (params.param.Sl_snk)
722  {
723  LatticePropagator quark_prop_smr;
724  quark_prop_smr = quark_propagator;
725  sink_smear2(u_link_smr, quark_prop_smr,
727  params.param.wvf_param[loop],
728  params.param.wvfIntPar[loop],
729  j_decay);
730  if (Pt_src)
731  baryon(quark_prop_smr, phases,
733  xml_array, "Point_Shell_Wilson_Baryons");
734 
735  if (Sl_src)
736  baryon(quark_prop_smr, phases,
738  xml_array, "Shell_Shell_Wilson_Baryons");
739 
740  if (Wl_src)
741  baryon(quark_prop_smr, phases_nomom,
743  xml_array, "Wall_Shell_Wilson_Baryons");
744  } // end if (Sl_snk)
745 
746  // Wall sink
747  if (params.param.Wl_snk)
748  {
749  LatticePropagator wall_quark_prop;
750  wall_qprop(wall_quark_prop, quark_propagator, phases_nomom);
751 
752  if (Pt_src)
753  baryon(wall_quark_prop, phases_nomom,
755  xml_array, "Point_Wall_Wilson_Baryons");
756 
757  if (Sl_src)
758  baryon(wall_quark_prop, phases_nomom,
760  xml_array, "Shell_Wall_Wilson_Baryons");
761 
762  if (Wl_src)
763  baryon(wall_quark_prop, phases_nomom,
765  xml_array, "Wall_Wall_Wilson_Baryons");
766  } // end if (Wl_snk)
767 
768  swatch.stop();
769  QDPIO::cout << InlineSpectrumEnv::name << ": baryons computed: time= "
770  << swatch.getTimeInSeconds()
771  << " secs" << std::endl;
772  } // end if (BaryonP)
773 
774  pop(xml_array); // array element
775 
776  } // end for(loop)
777 
778  pop(xml_array); // Wilson_spectroscopy
779  pop(xml_out); // spectrum_w
780 
781  snoop.stop();
782  QDPIO::cout << InlineSpectrumEnv::name << ": total time = "
783  << snoop.getTimeInSeconds()
784  << " secs" << std::endl;
785 
786  QDPIO::cout << InlineSpectrumEnv::name << ": ran successfully" << std::endl;
787 
788  END_CODE();
789  }
790 
791 };
Inline measurement factory.
Baryon 2-pt functions.
Inline measurement of spectrum.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
InlineSpectrumParams params
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Fourier transform phase factor support.
Definition: sftmom.h:35
const Set & getSet() const
The set to be used in sumMulti.
Definition: sftmom.h:57
static T & Instance()
Definition: singleton.h:432
int mu
Definition: cool.cc:24
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void taproj(LatticeColorMatrix &a)
Take the traceless antihermitian projection of a color matrix.
Definition: taproj.cc:31
void curcor2(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark_prop_1, const LatticePropagator &quark_prop_2, const SftMom &phases, int t0, int no_vec_cur, XMLWriter &xml, const std::string &xml_group)
Construct current correlators.
Definition: curcor2_w.cc:44
void wall_qprop(LatticePropagator &wall_quark_prop, const LatticePropagator &quark_propagator, const SftMom &phases)
Construct a wall-sink propagator:
Definition: wall_qprop_w.cc:25
void mesons(const LatticePropagator &quark_prop_1, const LatticePropagator &quark_prop_2, const SftMom &phases, int t0, XMLWriter &xml, const std::string &xml_group)
Meson 2-pt functions.
Definition: mesons_w.cc:111
void hybmeson(const multi1d< LatticeColorMatrix > &f, const multi1d< LatticeColorMatrix > &u_smr, const LatticePropagator &quark_prop_1, const LatticePropagator &quark_prop_2, const SftMom &phases, multi1d< int > t_source, XMLWriter &xml, const std::string &xml_group)
Hybrid meson 2-pt functions.
Definition: hybmeson_w.cc:73
void baryon(const LatticePropagator &quark_propagator, const SftMom &phases, int t0, int bc_spec, bool time_rev, XMLWriter &xml, const std::string &xml_group)
Baryon 2-pt functions.
Definition: baryon_w.cc:38
void proginfo(XMLWriter &xml)
Print out basic information about this program.
Definition: proginfo.cc:24
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
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
Hybrid meson 2-pt functions.
int bc_spec
multi1d< int > t_srce
ForwardProp_t prop_header
Inline spectrum calculations.
Make xml file writer.
Calculates the antihermitian field strength tensor iF(mu,nu)
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
Meson 2-pt functions.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
void write(XMLWriter &xml, const std::string &path, const InlineSpectrumParams::NamedObject_t &input)
Propagator output.
Real getMass(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the Mass.
Definition: qprop_io.cc:16
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
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > & Mass
Definition: pbg5p_w.cc:29
push(xml_out,"Condensates")
int i
Definition: pbg5p_w.cc:55
void mesField(multi1d< LatticeColorMatrixF > &f, const multi1d< LatticeColorMatrixF > &u)
Calculates the antihermitian field strength tensor iF(mu,nu)
Definition: mesfield.cc:80
multi1d< int > getFermActBoundary(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the boundary.
Definition: qprop_io.cc:61
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
START_CODE()
Double zero
Definition: invbicg.cc:106
::std::string string
Definition: gtest.h:1979
Various parameter structs and reader/writers.
Print out basic info about this program.
Routines associated with Chroma propagator IO.
Fourier transform phase factor support.
Propagator parameters.
Definition: qprop_io.h:75
struct Chroma::InlineSpectrumParams::Param_t param
void write(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineSpectrumParams::NamedObject_t named_obj
Propagator source construction parameters.
Definition: qprop_io.h:27
multi1d< int > getTSrce() const
Definition: qprop_io.cc:120
Take the traceless antihermitian projection of a color matrix.
Construct a wall-sink propagator.