26 namespace InlinePropColorVecEnv
31 XMLReader inputtop(xml, path);
58 XMLReader inputtop(xml, path);
81 XMLReader inputtop(xml, path);
83 read(inputtop,
"Propagator", input.
prop);
119 namespace InlinePropColorVecEnv
126 return new InlineMeas(Params(xml_in, path));
158 XMLReader paramtop(xml_in, path);
160 if (paramtop.count(
"Frequency") == 1)
172 if (paramtop.count(
"xml_file") != 0)
179 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
196 push(xml_out,
"PropColorVec");
197 write(xml_out,
"update_no", update_no);
198 write(xml_out,
"xml_file", xml_file);
201 XMLFileWriter xml(xml_file);
202 func(update_no, xml);
206 func(update_no, xml_out);
223 multi1d<LatticeColorMatrix>
u;
224 XMLBufferWriter gauge_xml;
230 catch( std::bad_cast )
232 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
237 QDPIO::cerr <<
name <<
": std::map call failed: " << e << std::endl;
241 push(xml_out,
"PropColorVec");
242 write(xml_out,
"update_no", update_no);
244 QDPIO::cout <<
name <<
": propagator calculation" << std::endl;
252 write(xml_out,
"Config_info", gauge_xml);
254 push(xml_out,
"Output_version");
255 write(xml_out,
"out_version", 1);
259 MesPlq(xml_out,
"Observables",
u);
264 XMLReader source_file_xml, source_record_xml;
266 QDPIO::cout <<
"Snarf the source from a named buffer" << std::endl;
277 write(xml_out,
"Source_file_info", source_file_xml);
278 write(xml_out,
"Source_record_info", source_record_xml);
280 catch (std::bad_cast) {
281 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
285 QDPIO::cerr <<
name <<
": error extracting source_header: " << e << std::endl;
288 catch(
const char* e) {
289 QDPIO::cerr <<
name <<
": Caught some char* exception:" << std::endl;
290 QDPIO::cerr << e << std::endl;
291 QDPIO::cerr <<
"Rethrowing" << std::endl;
296 const QDP::MapObject<int,EVPair<LatticeColorVector> >&
eigen_source =
299 QDPIO::cout <<
"Source successfully read and parsed" << std::endl;
310 XMLBufferWriter file_xml;
312 push(file_xml,
"MODMetaData");
314 write(file_xml,
"lattSize", QDP::Layout::lattSize());
321 write(file_xml,
"Config_info", gauge_xml);
324 file_str = file_xml.str();
329 XMLReader MapObjReader(xml_s);
341 catch (std::bad_cast)
343 QDPIO::cerr <<
name <<
": caught dynamic cast error" << std::endl;
348 QDPIO::cerr <<
name <<
": error creating prop: " << e << std::endl;
353 QDP::MapObject<KeyPropColorVec_t,LatticeFermion>& prop_obj =
363 multi1d<Double> source_corrs = sumMulti(localNorm2(tmpvec.
eigenVector), phases.
getSet());
365 push(xml_out,
"Source_correlators");
366 write(xml_out,
"source_corrs", source_corrs);
374 <<
" is greater than the number of available colorvectors= "
390 QDPIO::cout <<
"Try the various factories" << std::endl;
393 typedef LatticeFermion
T;
394 typedef multi1d<LatticeColorMatrix>
P;
395 typedef multi1d<LatticeColorMatrix>
Q;
401 XMLReader fermacttop(xml_s);
415 QDPIO::cout <<
"Suitable factory found: compute all the quark props" << std::endl;
427 SftMom phases(0,
true, decay_dir);
431 for(
int tt=0; tt < t_sources.size(); ++tt)
434 QDPIO::cout <<
"t_source = " <<
t_source << std::endl;
437 for(
int colorvec_source=0; colorvec_source < num_vecs; ++colorvec_source)
439 QDPIO::cout <<
"colorvec_source = " << colorvec_source << std::endl;
442 LatticeColorVector vec_srce =
zero;
447 for(
int spin_source=0; spin_source < Ns; ++spin_source)
449 QDPIO::cout <<
"spin_source = " << spin_source << std::endl;
456 LatticeFermion quark_soln =
zero;
467 prop_obj.insert(key, quark_soln);
473 QDPIO::cout <<
"Propagators computed: time= "
474 << swatch.getTimeInSeconds()
475 <<
" secs" << std::endl;
479 QDPIO::cout <<
name <<
": caught exception around qprop: " << e << std::endl;
483 push(xml_out,
"Relaxation_Iterations");
484 write(xml_out,
"ncg_had", ncg_had);
494 XMLBufferWriter file_xml;
496 push(file_xml,
"PropColorVectors");
497 write(file_xml,
"num_records", prop_obj.size());
499 write(file_xml,
"Config_info", gauge_xml);
502 XMLBufferWriter record_xml;
503 push(record_xml,
"PropColorVector");
504 write(record_xml,
"num_records", prop_obj.size());
513 QDPIO::cout <<
name <<
": total time = "
514 << snoop.getTimeInSeconds()
515 <<
" secs" << std::endl;
517 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
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.
const Set & getSet() const
The set to be used in sumMulti.
Class structure for fermion actions.
Fermion action factories.
All Wilson-type 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 the propagator elements M^-1 * multi1d<LatticeColorVector>
Key for propagator colorstd::vector sources.
Named object function std::map.
static bool registered
Local registration flag.
multi1d< LatticeColorMatrix > P
void write(XMLWriter &xml, const std::string &path, const InlinePropColorVecEnv::Params::NamedObject_t &input)
Propagator output.
void read(XMLReader &xml, const std::string &path, InlinePropColorVecEnv::Params::NamedObject_t &input)
Propagator input.
bool registerAll()
Register all the factories.
bool registerAll()
aggregate everything
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
Print out basic info about this program.
Fourier transform phase factor support.
struct Chroma::InlinePropColorVecEnv::Params::Param_t param
struct Chroma::InlinePropColorVecEnv::Params::NamedObject_t named_obj
Holds return info from SystemSolver call.
Holds of vectors and weights.