31 namespace InlineGlueballOpsEnv
36 XMLReader paramtop(xml, path);
39 read(paramtop,
"version", version);
50 QDPIO::cerr <<
"Input parameter version " << version <<
" unsupported." << std::endl;
70 write(xml,
"version", version);
83 XMLReader inputtop(xml, path);
108 namespace InlineGlueballOpsEnv
113 AbsInlineMeasurement* createMeasurement(XMLReader& xml_in,
116 return new InlineMeas(Params(xml_in, path));
143 StandardOutputStream&
operator<<(StandardOutputStream& os,
const multi1d<int>&
d)
149 for(
int i=1;
i <
d.size(); ++
i)
170 XMLReader paramtop(xml_in, path);
172 if (paramtop.count(
"Frequency") == 1)
184 if (paramtop.count(
"xml_file") != 0)
191 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
220 multi1d<int> no_disp(1); no_disp[0] = 0;
224 if (orig.size() == 1)
253 push(xml_out,
"GlueballOps");
254 write(xml_out,
"update_no", update_no);
255 write(xml_out,
"xml_file", xml_file);
258 XMLFileWriter xml(xml_file);
259 func(update_no, xml);
263 func(update_no, xml_out);
283 XMLBufferWriter gauge_xml;
289 catch( std::bad_cast )
291 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
296 QDPIO::cerr <<
name <<
": std::map call failed: " << e << std::endl;
301 const multi1d<LatticeColorMatrix>&
u =
304 push(xml_out,
"GlueballOps");
305 write(xml_out,
"update_no", update_no);
307 QDPIO::cout <<
name <<
": Glueball operators" << std::endl;
315 write(xml_out,
"Config_info", gauge_xml);
317 push(xml_out,
"Output_version");
318 write(xml_out,
"out_version", 1);
323 MesPlq(xml_out,
"Observables",
u);
331 QDPIO::cerr <<
name <<
": only support zero momentum at the moment. Need generalizatin for left derivs\n";
343 multi1d<LatticeColorMatrix> u_smr =
u;
348 XMLReader linktop(xml_l);
357 (*linkSmearing)(u_smr);
361 QDPIO::cerr <<
name <<
": Caught Exception link smearing: " << e << std::endl;
366 MesPlq(xml_out,
"Smeared_Observables", u_smr);
372 multi1d<LatticeColorMatrix> B_mag(
Nd-1);
378 QDPIO::cerr <<
name <<
": expects a 4d build\n";
383 multi1d<LatticeColorMatrix> f;
392 multi1d<int> sgnn(3);
398 for(
int i=0;
i < B_mag.size(); ++
i)
401 B_mag[
i] = sgnn[
i] * imag(f[ind[
i]]);
406 QDPIO::cerr <<
name <<
": some exception while producing B fields: " << e << std::endl;
420 XMLBufferWriter file_xml;
423 multi1d<SubsetVectorWeight_t> evals(1);
425 evals[0].weights = Real(1);
427 push(file_xml,
"DBMetaData");
429 write(file_xml,
"lattSize", QDP::Layout::lattSize());
434 write(file_xml,
"Config_info", gauge_xml);
435 write(file_xml,
"Weights", evals);
439 qdp_db.setMaxUserInfoLen(file_str.size());
443 qdp_db.insertUserdata(file_str);
457 QDPIO::cout <<
"Building glue operators" << std::endl;
459 push(xml_out,
"ElementalOps");
472 QDPIO::cout <<
"Elemental operator: op = " <<
l << std::endl;
477 QDPIO::cout <<
"displacement = " << disp << std::endl;
480 for(
int j = 0 ;
j < B_mag.size(); ++
j)
483 LatticeColorMatrix shift_vec =
rightNabla(u_smr,
489 for(
int i = 0 ;
i < B_mag.size(); ++
i)
493 LatticeComplex lop = trace(B_mag[
i] * shift_vec);
497 for(
int mom_num = 0 ; mom_num < phases.
numMom() ; ++mom_num)
500 multi1d<ComplexD> op_sum = sumMulti(phases[mom_num] * lop, phases.
getSet());
509 buf.
key.key().t_slice =
t;
511 buf.
key.key().left =
i + 1;
512 buf.
key.key().right =
j + 1;
513 buf.
key.key().displacement = disp;
516 buf.
val.data().op.resize(1);
517 buf.
val.data().op(0) = op_sum[
t];
520 qdp_db.insert(buf.
key, buf.
val);
530 QDPIO::cout <<
"Glue operator= " <<
l
532 << swiss.getTimeInSeconds()
533 <<
" secs" << std::endl;
543 QDPIO::cout <<
name <<
": total time = "
544 << snoop.getTimeInSeconds()
545 <<
" secs" << std::endl;
547 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Class for counted reference semantics.
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.
Fourier transform phase factor support.
int numSubsets() const
Number of subsets - length in decay direction.
multi1d< int > numToMom(int mom_num) const
Convert momenta id to actual array of momenta.
int numMom() const
Number of momenta.
const Set & getSet() const
The set to be used in sumMulti.
Parallel transport a lattice field.
void taproj(LatticeColorMatrix &a)
Take the traceless antihermitian projection of a color matrix.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
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.
LatticeColorVector rightNabla(const multi1d< LatticeColorMatrix > &u, const LatticeColorVector &chi, int length, const multi1d< int > &path)
Apply a right nabla path to a lattice field.
Class for counted reference semantics.
Inline measurement of glueball operators.
Key for glueball colorstd::vector matrix elements.
All link smearing constructors.
Factory for producing link smearing objects.
Calculates the antihermitian field strength tensor iF(mu,nu)
Named object function std::map.
static bool registered
Local registration flag.
const std::string name
Name to be used.
void write(XMLWriter &xml, const std::string &path, const Params::Param_t ¶m)
bool registerAll()
Register all the factories.
void read(XMLReader &xml, const std::string &path, Params::Param_t ¶m)
multi1d< int > normDisp(const multi1d< int > &orig)
Normalize just one displacement array.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
QDP::StandardOutputStream & operator<<(QDP::StandardOutputStream &s, const multi1d< int > &d)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void mesField(multi1d< LatticeColorMatrixF > &f, const multi1d< LatticeColorMatrixF > &u)
Calculates the antihermitian field strength tensor iF(mu,nu)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Print out basic info about this program.
Fourier transform phase factor support.
multi1d< multi1d< int > > displacement_list
void writeXML(XMLWriter &xml_out, const std::string &path) const
Holds key and value as temporaries.
SerialDBKey< KeyGlueElementalOperator_t > key
SerialDBData< ValGlueElementalOperator_t > val
Holds of vectors and weights.
Take the traceless antihermitian projection of a color matrix.