CHROMA
inline_genprop_matelem_colorvec_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector
3  *
4  * Generalized propagator calculation on a colorstd::vector
5  */
6 
7 #include "handle.h"
12 #include "meas/smear/displace.h"
13 #include "meas/glue/mesplq.h"
14 #include "qdp_map_obj.h"
15 #include "util/ferm/key_val_db.h"
17 #include "util/ft/sftmom.h"
18 #include "util/info/proginfo.h"
20 
22 
23 namespace Chroma
24 {
25  /*!
26  * \ingroup hadron
27  *
28  * @{
29  */
30  namespace InlineGenPropMatElemColorVecEnv
31  {
32  // Reader for input parameters
33  void read(XMLReader& xml, const std::string& path, Params::Param_t::DispGamma_t& param)
34  {
35  XMLReader paramtop(xml, path);
36 
37  read(paramtop, "gamma", param.gamma);
38  read(paramtop, "displacement", param.displacement);
39  }
40 
41  // Reader for input parameters
42  void read(XMLReader& xml, const std::string& path, Params::Param_t& param)
43  {
44  XMLReader paramtop(xml, path);
45 
46  int version;
47  read(paramtop, "version", version);
48 
49  switch (version)
50  {
51  case 1:
52  param.restrict_plateau = false;
53  param.avg_equiv_mom = false;
54  break;
55 
56  case 2:
57  read(paramtop, "restrict_plateau", param.restrict_plateau);
58  read(paramtop, "avg_equiv_mom", param.avg_equiv_mom);
59  break;
60 
61  default :
62  QDPIO::cerr << "Input parameter version " << version << " unsupported." << std::endl;
63  QDP_abort(1);
64  }
65 
66  read(paramtop, "t_source", param.t_source);
67  read(paramtop, "t_sink", param.t_sink);
68  read(paramtop, "mom2_max", param.mom2_max);
69  read(paramtop, "mom_offset", param.mom_offset);
70  read(paramtop, "displacement_length", param.displacement_length);
71  read(paramtop, "DisplacementGammaList", param.disp_gamma_list);
72  read(paramtop, "num_vecs", param.num_vecs);
73  read(paramtop, "decay_dir", param.decay_dir);
74  read(paramtop, "mass_label", param.mass_label);
75 
76  param.link_smearing = readXMLGroup(paramtop, "LinkSmearing", "LinkSmearingType");
77  }
78 
79 
80  // Writer for input parameters
81  void write(XMLWriter& xml, const std::string& path, const Params::Param_t::DispGamma_t& param)
82  {
83  push(xml, path);
84 
85  write(xml, "gamma", param.gamma);
86  write(xml, "displacement", param.displacement);
87 
88  pop(xml);
89  }
90 
91  // Writer for input parameters
92  void write(XMLWriter& xml, const std::string& path, const Params::Param_t& param)
93  {
94  push(xml, path);
95 
96  int version = 2;
97 
98  write(xml, "version", version);
99  write(xml, "restrict_plateau", param.restrict_plateau);
100  write(xml, "avg_equiv_mom", param.avg_equiv_mom);
101  write(xml, "t_source", param.t_source);
102  write(xml, "t_sink", param.t_sink);
103  write(xml, "mom_offset", param.mom_offset);
104  write(xml, "mom2_max", param.mom2_max);
105  write(xml, "displacement_length", param.displacement_length);
106  write(xml, "DisplacementGammaList", param.disp_gamma_list);
107  write(xml, "num_vecs", param.num_vecs);
108  write(xml, "decay_dir", param.decay_dir);
109  write(xml, "mass_label", param.mass_label);
110 
111  xml << param.link_smearing.xml;
112 
113  pop(xml);
114  }
115 
116  //! Read named objects
117  void read(XMLReader& xml, const std::string& path, Params::NamedObject_t& input)
118  {
119  XMLReader inputtop(xml, path);
120 
121  read(inputtop, "gauge_id", input.gauge_id);
122  read(inputtop, "source_prop_id", input.source_prop_id);
123  read(inputtop, "sink_prop_id", input.sink_prop_id);
124  read(inputtop, "genprop_op_file", input.genprop_op_file);
125  }
126 
127  //! Write named objects
128  void write(XMLWriter& xml, const std::string& path, const Params::NamedObject_t& input)
129  {
130  push(xml, path);
131 
132  write(xml, "gauge_id", input.gauge_id);
133  write(xml, "source_prop_id", input.source_prop_id);
134  write(xml, "sink_prop_id", input.sink_prop_id);
135  write(xml, "genprop_op_file", input.genprop_op_file);
136 
137  pop(xml);
138  }
139 
140  // Writer for input parameters
141  void write(XMLWriter& xml, const std::string& path, const Params& param)
142  {
143  param.writeXML(xml, path);
144  }
145  }
146 
147 
148  namespace InlineGenPropMatElemColorVecEnv
149  {
150  // Anonymous namespace for registration
151  namespace
152  {
153  AbsInlineMeasurement* createMeasurement(XMLReader& xml_in,
154  const std::string& path)
155  {
156  return new InlineMeas(Params(xml_in, path));
157  }
158 
159  //! Local registration flag
160  bool registered = false;
161  }
162 
163  const std::string name = "GENPROP_MATELEM_COLORVEC";
164 
165  //! Register all the factories
166  bool registerAll()
167  {
168  bool success = true;
169  if (! registered)
170  {
171  success &= LinkSmearingEnv::registerAll();
172  success &= TheInlineMeasurementFactory::Instance().registerObject(name, createMeasurement);
173  registered = true;
174  }
175  return success;
176  }
177 
178 
179  //! Anonymous namespace
180  /*! Diagnostic stuff */
181  namespace
182  {
183  StandardOutputStream& operator<<(StandardOutputStream& os, const multi1d<int>& d)
184  {
185  if (d.size() > 0)
186  {
187  os << d[0];
188 
189  for(int i=1; i < d.size(); ++i)
190  os << " " << d[i];
191  }
192 
193  return os;
194  }
195  }
196 
197 
198  //----------------------------------------------------------------------------
199  // Param stuff
201  {
202  frequency = 0;
203  param.mom2_max = 0;
204  }
205 
206  Params::Params(XMLReader& xml_in, const std::string& path)
207  {
208  try
209  {
210  XMLReader paramtop(xml_in, path);
211 
212  if (paramtop.count("Frequency") == 1)
213  read(paramtop, "Frequency", frequency);
214  else
215  frequency = 1;
216 
217  // Read program parameters
218  read(paramtop, "Param", param);
219 
220  // Read in the output propagator/source configuration info
221  read(paramtop, "NamedObject", named_obj);
222 
223  // Possible alternate XML file pattern
224  if (paramtop.count("xml_file") != 0)
225  {
226  read(paramtop, "xml_file", xml_file);
227  }
228  }
229  catch(const std::string& e)
230  {
231  QDPIO::cerr << __func__ << ": Caught Exception reading XML: " << e << std::endl;
232  QDP_abort(1);
233  }
234  }
235 
236 
237  void
238  Params::writeXML(XMLWriter& xml_out, const std::string& path) const
239  {
240  push(xml_out, path);
241 
242  // Parameters for source construction
243  write(xml_out, "Param", param);
244 
245  // Write out the output propagator/source configuration info
246  write(xml_out, "NamedObject", named_obj);
247 
248  pop(xml_out);
249  }
250 
251 
252  //----------------------------------------------------------------------------
253  //! Generalized propagator operator
255  {
256  int t_slice; /*!< Propagator time slice */
257  int t_source; /*!< Source time slice */
258  int t_sink; /*!< Source time slice */
259  int spin_l; /*!< Source spin index */
260  int spin_r; /*!< Sink spin index */
261  int gamma; /*!< The gamma matrix number - [0,Ns^2) */
262  multi1d<int> displacement; /*!< Displacement dirs of right colorstd::vector */
263  multi1d<int> mom; /*!< D-1 momentum of this operator */
264  std::string mass_label; /*!< A mass label */
265  };
266 
267  //! Generalized propagator operator
269  {
270  multi2d<ComplexD> op; /*!< Colorstd::vector source and sink with momentum projection */
271  };
272 
273 
274  //----------------------------------------------------------------------------
275  //! Holds key and value as temporaries
277  {
280  };
281 
282 
283  //----------------------------------------------------------------------------
284  //! KeyGenPropElementalOperator reader
285  void read(BinaryReader& bin, KeyGenPropElementalOperator_t& param)
286  {
287  read(bin, param.t_slice);
288  read(bin, param.t_source);
289  read(bin, param.t_sink);
290  read(bin, param.spin_l);
291  read(bin, param.spin_r);
292  read(bin, param.gamma);
293  read(bin, param.displacement);
294  read(bin, param.mom);
295  read(bin, param.mass_label, 32);
296  }
297 
298  //! GenPropElementalOperator write
299  void write(BinaryWriter& bin, const KeyGenPropElementalOperator_t& param)
300  {
301  write(bin, param.t_slice);
302  write(bin, param.t_source);
303  write(bin, param.t_sink);
304  write(bin, param.spin_l);
305  write(bin, param.spin_r);
306  write(bin, param.gamma);
307  write(bin, param.displacement);
308  write(bin, param.mom);
309  write(bin, param.mass_label);
310  }
311 
312 
313  //----------------------------------------------------------------------------
314  //! PropElementalOperator reader
315  void read(BinaryReader& bin, ValGenPropElementalOperator_t& param)
316  {
317  int n;
318  read(bin, n); // the size is always written, even if 0
319  param.op.resize(n,n);
320 
321  for(int i=0; i < n; ++i)
322  {
323  for(int j=0; j < n; ++j)
324  {
325  read(bin, param.op(i,j));
326  }
327  }
328  }
329 
330  //! GenPropElementalOperator write
331  void write(BinaryWriter& bin, const ValGenPropElementalOperator_t& param)
332  {
333  int n = param.op.size1(); // all sizes the same
334  write(bin, n);
335  for(int i=0; i < n; ++i)
336  {
337  for(int j=0; j < n; ++j)
338  {
339  write(bin, param.op(i,j));
340  }
341  }
342  }
343 
344 
345  //----------------------------------------------------------------------------
346  //! Normalize just one displacement array
347  multi1d<int> normDisp(const multi1d<int>& orig)
348  {
349  START_CODE();
350 
351  multi1d<int> disp;
352  multi1d<int> empty;
353  multi1d<int> no_disp(1); no_disp[0] = 0;
354 
355  // NOTE: a no-displacement is recorded as a zero-length array
356  // Convert a length one array with no displacement into a no-displacement array
357  if (orig.size() == 1)
358  {
359  if (orig == no_disp)
360  disp = empty;
361  else
362  disp = orig;
363  }
364  else
365  {
366  disp = orig;
367  }
368 
369  END_CODE();
370 
371  return disp;
372  } // void normDisp
373 
374 
375  //-------------------------------------------------------------------------------
376  // Function call
377  void
378  InlineMeas::operator()(unsigned long update_no,
379  XMLWriter& xml_out)
380  {
381  // If xml file not empty, then use alternate
382  if (params.xml_file != "")
383  {
384  std::string xml_file = makeXMLFileName(params.xml_file, update_no);
385 
386  push(xml_out, "GenPropMatElemColorVec");
387  write(xml_out, "update_no", update_no);
388  write(xml_out, "xml_file", xml_file);
389  pop(xml_out);
390 
391  XMLFileWriter xml(xml_file);
392  func(update_no, xml);
393  }
394  else
395  {
396  func(update_no, xml_out);
397  }
398  }
399 
400 
401  // Function call
402  void
403  InlineMeas::func(unsigned long update_no,
404  XMLWriter& xml_out)
405  {
406  START_CODE();
407 
408  StopWatch snoop;
409  snoop.reset();
410  snoop.start();
411 
412  StopWatch swiss;
413 
414  push(xml_out, "GenPropMatElemColorVec");
415  write(xml_out, "update_no", update_no);
416 
417  QDPIO::cout << name << ": Generalized propagator color-std::vector matrix element" << std::endl;
418 
419  // Test and grab a reference to the gauge field
420  XMLBufferWriter gauge_xml;
421  XMLReader source_prop_file_xml, source_prop_record_xml;
422  XMLReader sink_prop_file_xml, sink_prop_record_xml;
423  try
424  {
425  TheNamedObjMap::Instance().getData< multi1d<LatticeColorMatrix> >(params.named_obj.gauge_id);
426  TheNamedObjMap::Instance().get(params.named_obj.gauge_id).getRecordXML(gauge_xml);
427 
429 
431 
432  // Snarf the prop info. This is will throw if the prop_id is not there
433  TheNamedObjMap::Instance().get(params.named_obj.source_prop_id).getFileXML(source_prop_file_xml);
434  TheNamedObjMap::Instance().get(params.named_obj.source_prop_id).getRecordXML(source_prop_record_xml);
435 
436  // Snarf the prop info. This is will throw if the prop_id is not there
437  TheNamedObjMap::Instance().get(params.named_obj.sink_prop_id).getFileXML(sink_prop_file_xml);
438  TheNamedObjMap::Instance().get(params.named_obj.sink_prop_id).getRecordXML(sink_prop_record_xml);
439  }
440  catch( std::bad_cast )
441  {
442  QDPIO::cerr << name << ": caught dynamic cast error" << std::endl;
443  QDP_abort(1);
444  }
445  catch (const std::string& e)
446  {
447  QDPIO::cerr << name << ": std::map call failed: " << e << std::endl;
448  QDP_abort(1);
449  }
450  // Cast should be valid now
451  const multi1d<LatticeColorMatrix>& u =
452  TheNamedObjMap::Instance().getData< multi1d<LatticeColorMatrix> >(params.named_obj.gauge_id);
453 
454  QDP::MapObject<KeyPropColorVec_t,LatticeFermion>& source_ferm_map =
456 
457  QDP::MapObject<KeyPropColorVec_t,LatticeFermion>& sink_ferm_map =
459 
460  push(xml_out, "Output_version");
461  write(xml_out, "out_version", 2);
462  pop(xml_out);
463 
464  proginfo(xml_out); // Print out basic program info
465 
466  // Write out the input
467  params.writeXML(xml_out, "Input");
468 
469  // Write out the source header
470  write(xml_out, "Source_prop_file_info", source_prop_file_xml);
471  write(xml_out, "Source_prop_record_info", source_prop_record_xml);
472  write(xml_out, "Sink_prop_file_info", sink_prop_file_xml);
473  write(xml_out, "Sink_prop_record_info", sink_prop_record_xml);
474 
475  // Write out the config info
476  write(xml_out, "Config_info", gauge_xml);
477 
478  //First calculate some gauge invariant observables just for info.
479  //This is really cheap.
480  MesPlq(xml_out, "Observables", u);
481 
482  //
483  // Initialize the slow Fourier transform phases
484  //
485  multi1d<int> origin_offset(Nd);
486  origin_offset = 0;
487  SftMom phases(params.param.mom2_max, origin_offset, params.param.mom_offset,
489 
490  //
491  // Smear the gauge field if needed
492  //
493  multi1d<LatticeColorMatrix> u_smr = u;
494 
495  try
496  {
497  std::istringstream xml_l(params.param.link_smearing.xml);
498  XMLReader linktop(xml_l);
499  QDPIO::cout << "Link smearing type = " << params.param.link_smearing.id << std::endl;
500 
501 
503  linkSmearing(TheLinkSmearingFactory::Instance().createObject(params.param.link_smearing.id,
504  linktop,
506 
507  (*linkSmearing)(u_smr);
508  }
509  catch(const std::string& e)
510  {
511  QDPIO::cerr << name << ": Caught Exception link smearing: " << e << std::endl;
512  QDP_abort(1);
513  }
514 
515  MesPlq(xml_out, "Smeared_Observables", u_smr);
516 
517  //
518  // DB storage
519  //
520  BinaryStoreDB< SerialDBKey<KeyGenPropElementalOperator_t>, SerialDBData<ValGenPropElementalOperator_t> >
521  qdp_db;
522 
523  // Open the file, and write the meta-data and the binary for this operator
524  if (! qdp_db.fileExists(params.named_obj.genprop_op_file))
525  {
526  XMLBufferWriter file_xml;
527 
528  push(file_xml, "DBMetaData");
529  write(file_xml, "id", std::string("genPropElemOp"));
530  write(file_xml, "lattSize", QDP::Layout::lattSize());
531  write(file_xml, "decay_dir", params.param.decay_dir);
532  proginfo(file_xml); // Print out basic program info
533  write(file_xml, "Params", params.param);
534  write(file_xml, "Op_Info", params.param.disp_gamma_list);
535  write(file_xml, "Source_prop_record_info", source_prop_record_xml);
536  write(file_xml, "Sink_prop_record_info", sink_prop_record_xml);
537  write(file_xml, "Config_info", gauge_xml);
538  pop(file_xml);
539 
540  // NOTE: we always write a metadata, even if the file exists.
541  // Probably should not do this if a file already exists.
542  // Yukky, but add on a bunch of padding.
543  // This is in case a latter task writes another metadata.
544  std::string file_str(file_xml.str());
545  qdp_db.setMaxUserInfoLen(file_str.size());
546 
547  qdp_db.open(params.named_obj.genprop_op_file, O_RDWR | O_CREAT, 0664);
548 
549  qdp_db.insertUserdata(file_str);
550  }
551  else
552  {
553  qdp_db.open(params.named_obj.genprop_op_file, O_RDWR, 0664);
554  }
555 
556 
557  //
558  // Generalized propagatos
559  //
560  QDPIO::cout << "Building generalized propagators" << std::endl;
561 
562  push(xml_out, "ElementalOps");
563 
564  // Loop over all time slices for the source. This is the same
565  // as the subsets for phases
566 
567  const bool restrict_plateau = params.param.restrict_plateau;
568  const int num_vecs = params.param.num_vecs;
569  const int decay_dir = params.param.decay_dir;
570  const int t_source = params.param.t_source;
571  const int t_sink = params.param.t_sink;
572 
573  // Define the start and end region for the plateau
574  int t_start;
575  int t_end;
576 
577  if (restrict_plateau)
578  {
579  t_start = t_source;
580  t_end = t_sink;
581 
582  if (t_source > t_sink)
583  {
584  t_end += phases.numSubsets();
585  }
586  }
587  else
588  {
589  t_start = 0;
590  t_end = phases.numSubsets() - 1;
591  }
592 
593  // Loop over each operator
594  for(int l=0; l < params.param.disp_gamma_list.size(); ++l)
595  {
596  StopWatch watch;
597 
598  QDPIO::cout << "Elemental operator: op = " << l << std::endl;
599 
600  // Make sure displacement is something sensible
601  multi1d<int> disp = normDisp(params.param.disp_gamma_list[l].displacement);
602 
603  // Fold in the gamma_5 associated with hermiticity of the sink.
604  // Can multiply the desired Gamma on the left by gamma_5
605  int gamma = params.param.disp_gamma_list[l].gamma;
606  int gamma_tmp = (Ns*Ns-1) ^ gamma;
607 
608  QDPIO::cout << "gamma=" << gamma_tmp << " displacement= " << disp << std::endl;
609 
610  // Build the operator
611  swiss.reset();
612  swiss.start();
613 
614  // Big loop over the momentum projection
615  for(int mom_num = 0 ; mom_num < phases.numMom() ; ++mom_num)
616  {
617  // Loop over spins
618  for(int spin_r=0; spin_r < Ns; ++spin_r)
619  {
620  QDPIO::cout << "spin_r = " << spin_r << std::endl;
621 
622  for(int spin_l=0; spin_l < Ns; ++spin_l)
623  {
624  QDPIO::cout << "spin_l = " << spin_l << std::endl;
625 
626  // The keys for the spin and displacements for this particular elemental operator
627  // No displacement for left colorstd::vector, only displace right colorstd::vector
628  // Invert the time - make it an independent key
629  multi1d<KeyValGenPropElementalOperator_t> buf(phases.numSubsets());
630  for(int tt=t_start; tt <= t_end; ++tt)
631  {
632  int t = tt % phases.numSubsets(); // mod back into a normal interval
633 
634  buf[t].key.key().t_slice = t;
635  buf[t].key.key().t_source = t_source;
636  buf[t].key.key().t_sink = t_sink;
637  buf[t].key.key().spin_r = spin_r;
638  buf[t].key.key().spin_l = spin_l;
639  buf[t].key.key().mass_label = params.param.mass_label;
640  buf[t].key.key().mom = phases.numToMom(mom_num);
641  buf[t].key.key().gamma = gamma;
642  buf[t].key.key().displacement = disp; // only right colorstd::vector
643 
644  buf[t].val.data().op.resize(num_vecs, num_vecs);
645  }
646 
647  for(int j = 0; j < params.param.num_vecs; ++j)
648  {
649  KeyPropColorVec_t key_r;
650  key_r.t_source = t_source;
651  key_r.colorvec_src = j;
652  key_r.spin_src = spin_r;
653 
654  // Displace the right std::vector and multiply by the momentum phase
655 
656  LatticeFermion shift_ferm;
657  {
658  LatticeFermion tmpvec; source_ferm_map.get(key_r, tmpvec);
659 
660  shift_ferm = Gamma(gamma_tmp) * displace(u_smr,
661  tmpvec,
663  disp);
664  }
665 
666  for(int i = 0; i < params.param.num_vecs; ++i)
667  {
668  KeyPropColorVec_t key_l;
669  key_l.t_source = t_sink;
670  key_l.colorvec_src = i;
671  key_l.spin_src = spin_l;
672 
673  watch.reset();
674  watch.start();
675 
676  // Contract over color indices
677  // Do the relevant quark contraction
678  LatticeFermion tmpvec_sink; sink_ferm_map.get(key_l, tmpvec_sink);
679 
680  LatticeComplex lop = localInnerProduct(tmpvec_sink, shift_ferm);
681 
682  // Reweight the phase in case there was momentum averaging
683  Real reweight;
684  if (phases.multiplicity(mom_num) > 0)
685  reweight = Real(phases.multiplicity(mom_num));
686  else
687  reweight = 1.0;
688 
689  // Slow fourier-transform
690  multi1d<ComplexD> op_sum = sumMulti(reweight * phases[mom_num] * lop, phases.getSet());
691 
692  watch.stop();
693 
694  for(int tt=t_start; tt <= t_end; ++tt)
695  {
696  int t = tt % phases.numSubsets(); // mod back into a normal interval
697  buf[t].val.data().op(i,j) = op_sum[t];
698  }
699  } // end for i
700  } // end for j
701 
702  QDPIO::cout << "insert: mom= " << phases.numToMom(mom_num) << " displacement= " << disp << std::endl;
703  for(int tt=t_start; tt <= t_end; ++tt)
704  {
705  int t = tt % phases.numSubsets(); // mod back into a normal interval
706  qdp_db.insert(buf[t].key, buf[t].val);
707  }
708 
709  } // end for spin_l
710  } // end for spin_r
711  } // mom_num
712 
713  swiss.stop();
714 
715  QDPIO::cout << "GenProp operator= " << l
716  << " time= "
717  << swiss.getTimeInSeconds()
718  << " secs" << std::endl;
719 
720  } // for l
721 
722  pop(xml_out); // ElementalOps
723 
724  // Close the namelist output file XMLDAT
725  pop(xml_out); // GenPropMatElemColorVector
726 
727  snoop.stop();
728  QDPIO::cout << name << ": total time = "
729  << snoop.getTimeInSeconds()
730  << " secs" << std::endl;
731 
732  QDPIO::cout << name << ": ran successfully" << std::endl;
733 
734  END_CODE();
735  } // func
736  } // namespace InlineGenPropMatElemColorVecEnv
737 
738  /*! @} */ // end of group hadron
739 
740 } // namespace Chroma
Inline measurement factory.
Class for counted reference semantics.
Definition: handle.h:33
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Serializable value harness.
Definition: key_val_db.h:69
Serializable key harness.
Definition: key_val_db.h:21
Fourier transform phase factor support.
Definition: sftmom.h:35
int numSubsets() const
Number of subsets - length in decay direction.
Definition: sftmom.h:63
multi1d< int > numToMom(int mom_num) const
Convert momenta id to actual array of momenta.
Definition: sftmom.h:78
int numMom() const
Number of momenta.
Definition: sftmom.h:60
int multiplicity(int mom_num) const
Return the the multiplicity for this momenta id.
Definition: sftmom.h:94
const Set & getSet() const
The set to be used in sumMulti.
Definition: sftmom.h:57
static T & Instance()
Definition: singleton.h:432
Parallel transport a lattice field.
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.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
T displace(const multi1d< LatticeColorMatrix > &u, const T &psi, int length, int dir, const Subset &sub)
Apply a displacement operator to a lattice field.
Definition: displace.cc:41
Class for counted reference semantics.
Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector.
Key for propagator colorstd::vector sources.
Key and values for DB.
unsigned j
Definition: ldumul_w.cc:35
unsigned n
Definition: ldumul_w.cc:36
Make xml file writer.
int t
Definition: meslate.cc:37
Nd
Definition: meslate.cc:74
Named object function std::map.
static bool registered
Local registration flag.
multi1d< int > normDisp(const multi1d< int > &orig)
Normalize just one displacement array.
void write(XMLWriter &xml, const std::string &path, const Params::Param_t::DispGamma_t &param)
void read(XMLReader &xml, const std::string &path, Params::Param_t::DispGamma_t &param)
QDPSubTypeTrait< typename BinaryReturn< C1, C2, FnLocalInnerProduct >::Type_t >::Type_t localInnerProduct(const QDPSubType< T1, C1 > &l, const QDPType< T2, C2 > &r)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDP::StandardOutputStream & operator<<(QDP::StandardOutputStream &s, const multi1d< int > &d)
Definition: npr_vertex_w.cc:12
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
int i
Definition: pbg5p_w.cc:55
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
DComplex d
Definition: invbicg.cc:99
START_CODE()
::std::string string
Definition: gtest.h:1979
int l
Definition: pade_trln_w.cc:111
Print out basic info about this program.
Fourier transform phase factor support.
void writeXML(XMLWriter &xml_out, const std::string &path) const