29 namespace InlineGlueDiagMatElemColorVecEnv
34 XMLReader paramtop(xml, path);
37 read(paramtop,
"version", version);
48 QDPIO::cerr <<
"Input parameter version " << version <<
" unsupported." << std::endl;
69 write(xml,
"version", version);
83 XMLReader inputtop(xml, path);
110 namespace InlineGlueDiagMatElemColorVecEnv
115 AbsInlineMeasurement* createMeasurement(XMLReader& xml_in,
118 return new InlineMeas(Params(xml_in, path));
145 StandardOutputStream&
operator<<(StandardOutputStream& os,
const multi1d<int>&
d)
151 for(
int i=1;
i <
d.size(); ++
i)
172 XMLReader paramtop(xml_in, path);
174 if (paramtop.count(
"Frequency") == 1)
186 if (paramtop.count(
"xml_file") != 0)
193 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
222 multi1d<int> no_disp(1); no_disp[0] = 0;
226 if (orig.size() == 1)
255 push(xml_out,
"GlueDiagMatElemColorVec");
256 write(xml_out,
"update_no", update_no);
257 write(xml_out,
"xml_file", xml_file);
260 XMLFileWriter xml(xml_file);
261 func(update_no, xml);
265 func(update_no, xml_out);
285 XMLBufferWriter gauge_xml;
294 catch( std::bad_cast )
296 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
301 QDPIO::cerr <<
name <<
": std::map call failed: " << e << std::endl;
306 const multi1d<LatticeColorMatrix>&
u =
309 const MapObject<int,EVPair<LatticeColorVector> >&
eigen_source =
312 push(xml_out,
"GlueDiagMatElemColorVec");
313 write(xml_out,
"update_no", update_no);
315 QDPIO::cout <<
name <<
": Glue color-std::vector matrix element" << std::endl;
323 write(xml_out,
"Config_info", gauge_xml);
325 push(xml_out,
"Output_version");
326 write(xml_out,
"out_version", 1);
331 MesPlq(xml_out,
"Observables",
u);
339 QDPIO::cerr <<
name <<
": only support zero momentum at the moment. Need generalizatin for left derivs\n";
351 multi1d<LatticeColorMatrix> u_smr =
u;
356 XMLReader linktop(xml_l);
365 (*linkSmearing)(u_smr);
369 QDPIO::cerr <<
name <<
": Caught Exception link smearing: " << e << std::endl;
374 MesPlq(xml_out,
"Smeared_Observables", u_smr);
385 XMLBufferWriter file_xml;
387 push(file_xml,
"DBMetaData");
389 write(file_xml,
"lattSize", QDP::Layout::lattSize());
394 write(file_xml,
"Config_info", gauge_xml);
399 qdp_db.setMaxUserInfoLen(file_str.size());
403 qdp_db.insertUserdata(file_str);
417 QDPIO::cout <<
"Building glue operators" << std::endl;
419 push(xml_out,
"ElementalOps");
430 QDPIO::cout <<
"Elemental operator: op = " <<
l << std::endl;
435 QDPIO::cout <<
"displacement = " << disp << std::endl;
442 for(
int mom_num = 0 ; mom_num < phases.
numMom() ; ++mom_num)
447 multi1d<KeyValGlueElementalOperator_t> buf(phases.
numSubsets());
450 buf[
t].key.key().t_slice =
t;
451 buf[
t].key.key().mom = phases.
numToMom(mom_num);
452 buf[
t].key.key().left = 0;
453 buf[
t].key.key().right = 0;
454 buf[
t].key.key().displacement = disp;
467 LatticeColorVector shift_vec =
rightNabla(u_smr,
477 multi1d<ComplexD> op_sum = sumMulti(phases[mom_num] * lop, phases.
getSet());
481 for(
int t=0;
t < op_sum.size(); ++
t)
483 buf[
t].val.data().op(
j) = op_sum[
t];
490 qdp_db.insert(buf[
t].key, buf[
t].val);
497 QDPIO::cout <<
"Glue operator= " <<
l
499 << swiss.getTimeInSeconds()
500 <<
" secs" << std::endl;
510 QDPIO::cout <<
name <<
": total time = "
511 << snoop.getTimeInSeconds()
512 <<
" secs" << std::endl;
514 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 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 via colorstd::vector matrix elements.
MODS_t & eigen_source
Eigenvectors.
Key for glueball colorstd::vector matrix elements.
All link smearing constructors.
Factory for producing link smearing objects.
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)
void read(XMLReader &xml, const std::string &path, Params::Param_t ¶m)
bool registerAll()
Register all the factories.
multi1d< int > normDisp(const multi1d< int > &orig)
Normalize just one displacement array.
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.
QDP::StandardOutputStream & operator<<(QDP::StandardOutputStream &s, const multi1d< int > &d)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
multi1d< SubsetVectorWeight_t > getEigenValues(const MapObject< int, EVPair< LatticeColorVector > > &eigen_source, int num_vecs)
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 of vectors and weights.