28 namespace InlineStaticPropColorVecEnv
33 XMLReader inputtop(xml, path);
60 XMLReader inputtop(xml, path);
83 XMLReader inputtop(xml, path);
119 namespace InlineStaticPropColorVecEnv
126 return new InlineMeas(Params(xml_in, path));
157 XMLReader paramtop(xml_in, path);
159 if (paramtop.count(
"Frequency") == 1)
171 if (paramtop.count(
"xml_file") != 0)
178 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
195 push(xml_out,
"StaticPropColorVec");
196 write(xml_out,
"update_no", update_no);
197 write(xml_out,
"xml_file", xml_file);
200 XMLFileWriter xml(xml_file);
201 func(update_no, xml);
205 func(update_no, xml_out);
222 multi1d<LatticeColorMatrix>
u;
223 XMLBufferWriter gauge_xml;
229 catch( std::bad_cast )
231 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
236 QDPIO::cerr <<
name <<
": std::map call failed: " << e << std::endl;
240 push(xml_out,
"PropColorVec");
241 write(xml_out,
"update_no", update_no);
243 QDPIO::cout <<
name <<
": propagator calculation" << std::endl;
251 write(xml_out,
"Config_info", gauge_xml);
253 push(xml_out,
"Output_version");
254 write(xml_out,
"out_version", 1);
258 MesPlq(xml_out,
"Observables",
u);
263 XMLReader source_file_xml, source_record_xml;
265 QDPIO::cout <<
"Snarf the source from a named buffer" << std::endl;
275 write(xml_out,
"Source_file_info", source_file_xml);
276 write(xml_out,
"Source_record_info", source_record_xml);
278 catch (std::bad_cast)
280 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
285 QDPIO::cerr <<
name <<
": error extracting source_header: " << e << std::endl;
290 const QDP::MapObject<int,EVPair<LatticeColorVector> >&
eigen_source =
293 QDPIO::cout <<
"Source successfully read and parsed" << std::endl;
304 XMLBufferWriter file_xml;
306 push(file_xml,
"MODMetaData");
308 write(file_xml,
"lattSize", QDP::Layout::lattSize());
312 write(file_xml,
"Config_info", gauge_xml);
315 file_str = file_xml.str();
320 XMLReader MapObjReader(xml_s);
329 catch (std::bad_cast)
331 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
336 QDPIO::cerr <<
name <<
": error creating prop: " << e << std::endl;
341 QDP::MapObject<KeyPropColorVec_t,LatticeFermion>& prop_obj =
351 multi1d<Double> source_corrs = sumMulti(localNorm2(tmpvec.
eigenVector), phases.
getSet());
353 push(xml_out,
"Source_correlators");
354 write(xml_out,
"source_corrs", source_corrs);
362 <<
" is greater than the number of available colorvectors= "
385 SftMom phases(0,
true, decay_dir);
394 for(
int tt=0; tt < t_sources.size(); ++tt)
397 QDPIO::cout <<
"t_source = " <<
t_source << std::endl;
405 LatticeColorMatrix u_shift =
zero;
408 for(
int t=1;
t < Nt; ++
t)
411 LatticeColorMatrix
tmp = shift(adj(
u[decay_dir]) * u_shift,
BACKWARD, decay_dir);
417 for(
int colorvec_source=0; colorvec_source < num_vecs; ++colorvec_source)
419 QDPIO::cout <<
"colorvec_source = " << colorvec_source << std::endl;
422 LatticeColorVector vec_srce =
zero;
426 for(
int t=1;
t < Nt; ++
t)
429 LatticeColorVector
tmp = shift(vec_srce,
BACKWARD, decay_dir);
434 LatticeColorVector vec_shift = u_shift * vec_srce;
437 for(
int spin_source=0; spin_source < Ns; ++spin_source)
445 LatticeFermion quark_soln = spin_mat *
chi;
453 prop_obj.insert(key, quark_soln);
462 QDPIO::cout <<
name <<
": caught exception around static prop: " << e << std::endl;
470 XMLBufferWriter file_xml;
472 push(file_xml,
"PropColorVectors");
473 write(file_xml,
"num_records", prop_obj.size());
475 write(file_xml,
"Config_info", gauge_xml);
478 XMLBufferWriter record_xml;
479 push(record_xml,
"PropColorVector");
480 write(record_xml,
"num_records", prop_obj.size());
489 QDPIO::cout <<
name <<
": total time = "
490 << snoop.getTimeInSeconds()
491 <<
" secs" << std::endl;
493 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Baryon spin and projector matrices.
Class for counted reference semantics.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Fourier transform phase factor support.
int numSubsets() const
Number of subsets - length in decay direction.
const Set & getSet() const
The set to be used in sumMulti.
Parallel transport a lattice field.
Class structure for fermion actions.
void CvToFerm(const LatticeColorVectorF &a, LatticeFermionF &b, int spin_index)
Convert (insert) a LatticeColorVector into a LatticeFermion.
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.
MODS_t & eigen_source
Eigenvectors.
Compute a static prop (1/2)*(1+gamma_4)U*U*...U * multi1d<LatticeColorVector>
Key for propagator colorstd::vector sources.
Named object function std::map.
static bool registered
Local registration flag.
const std::string name
Name to be used.
SpinMatrix NR()
NR = (1/2)* ( 1 + g_4 )
bool registerAll()
Register all the factories.
void write(XMLWriter &xml, const std::string &path, const Params::NamedObject_t &input)
Propagator output.
void read(XMLReader &xml, const std::string &path, Params::NamedObject_t &input)
Propagator input.
bool registerAll()
aggregate everything
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
multi1d< LatticeFermion > chi(Ncb)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Print out basic info about this program.
Fourier transform phase factor support.
struct Chroma::InlineStaticPropColorVecEnv::Params::NamedObject_t named_obj
struct Chroma::InlineStaticPropColorVecEnv::Params::Param_t param
Holds of vectors and weights.