29 namespace InlineGlueMatElemColorVecEnv
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 InlineGlueMatElemColorVecEnv
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,
"GlueMatElemColorVec");
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,
"GlueMatElemColorVec");
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);
341 multi1d<LatticeColorMatrix> u_smr =
u;
346 XMLReader linktop(xml_l);
355 (*linkSmearing)(u_smr);
359 QDPIO::cerr <<
name <<
": Caught Exception link smearing: " << e << std::endl;
364 MesPlq(xml_out,
"Smeared_Observables", u_smr);
375 XMLBufferWriter file_xml;
377 push(file_xml,
"DBMetaData");
379 write(file_xml,
"lattSize", QDP::Layout::lattSize());
384 write(file_xml,
"Config_info", gauge_xml);
389 qdp_db.setMaxUserInfoLen(file_str.size());
393 qdp_db.insertUserdata(file_str);
407 QDPIO::cout <<
"Building glue operators" << std::endl;
409 push(xml_out,
"ElementalOps");
420 QDPIO::cout <<
"Elemental operator: op = " <<
l << std::endl;
425 QDPIO::cout <<
"displacement = " << disp << std::endl;
430 for(
int mu=0;
mu < disp.size(); ++
mu)
438 for(
int mom_num = 0 ; mom_num < phases.
numMom() ; ++mom_num)
443 multi1d<KeyValGlueElementalOperator_t> buf(phases.
numSubsets());
446 buf[
t].key.key().t_slice =
t;
447 buf[
t].key.key().mom = phases.
numToMom(mom_num);
448 buf[
t].key.key().left = 0;
449 buf[
t].key.key().right = 0;
450 buf[
t].key.key().displacement = disp;
475 multi1d<ComplexD> op_sum = sumMulti(phases[mom_num] * lop, phases.
getSet());
479 for(
int t=0;
t < op_sum.size(); ++
t)
481 buf[
t].val.data().op(
j) = fnorm * op_sum[
t];
488 qdp_db.insert(buf[
t].key, buf[
t].val);
495 QDPIO::cout <<
"Glue operator= " <<
l
497 << swiss.getTimeInSeconds()
498 <<
" secs" << std::endl;
508 QDPIO::cout <<
name <<
": total time = "
509 << snoop.getTimeInSeconds()
510 <<
" secs" << std::endl;
512 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 leftRightNabla(const LatticeColorVector &F, const multi1d< LatticeColorMatrix > &u, int mu, int length, int mom)
Apply first deriv to the right onto source.
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 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.
void write(XMLWriter &xml, const std::string &path, const Params::Param_t ¶m)
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.