25 namespace InlineStagToWilsEnv
59 XMLReader inputtop(xml, path);
84 XMLReader paramtop(xml_in, path);
86 if (paramtop.count(
"Frequency") == 1)
95 if (paramtop.count(
"xml_file") != 0)
102 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
129 push(xml_out,
"stag_to_wils");
130 write(xml_out,
"update_no", update_no);
131 write(xml_out,
"xml_file", xml_file);
134 XMLFileWriter xml(xml_file);
135 func(update_no, xml);
139 func(update_no, xml_out);
155 push(xml_out,
"stag_to_wils");
156 write(xml_out,
"update_no", update_no);
165 push(xml_out,
"Output_version");
166 write(xml_out,
"out_version", 1);
172 XMLReader stag_file_xml, stag_record_xml;
177 bool make_sourceP =
false;
178 bool SmearedSink =
false;
180 QDPIO::cout <<
"Snarf the staggered propagator from a named buffer" << std::endl;
184 LatticeStaggeredPropagator& stag_tmp =
194 if (stag_record_xml.count(
"/Propagator") != 0)
198 read(stag_record_xml,
"/Propagator/PropSource", source_header);
210 else if (stag_record_xml.count(
"/SinkSmear") != 0)
215 read(stag_record_xml,
"/SinkSmear/PropSource", source_header);
232 write(xml_out,
"StaggeredProp_file_info", stag_file_xml);
233 write(xml_out,
"StaggeredProp_record_info", stag_record_xml);
235 catch (std::bad_cast)
248 const LatticeStaggeredPropagator& stag_prop =
251 QDPIO::cout <<
"Staggered propagator successfully read and parsed" << std::endl;
259 multi1d<Double> stag_corr = sumMulti(localNorm2(stag_prop),
262 push(xml_out,
"StaggeredProp_correlator");
263 write(xml_out,
"stag_prop_corr", stag_corr);
274 catch (std::bad_cast)
287 LatticePropagator& wils_prop =
294 QDPIO::cerr<<
"Error: Only forward props supported" << std::endl;
298 LatticeColorMatrix xx = peekSpin(stag_prop,0,0) ;
300 for(
int s(0);
s<Ns;
s++){
301 pokeSpin(wils_prop,xx,
s,
s);
306 QDPIO::cout<<
"SOURCE: " ;
307 for(
int d(0);
d<
Nd;
d++)
309 QDPIO::cout<<std::endl;
310 SpinMatrix Omega = 1.0 ;
314 QDPIO::cout<<
"SOURCE gamma: "<<g<<std::endl ;
315 Omega = Gamma(g)*Omega ;
318 LatticeSpinMatrix lOmega=1.0 ;
319 LatticeInteger lg =
zero;
321 lg = lg | ((Layout::latticeCoordinate(
mu)%2)<<
mu) ;
323 for(
int g(0);g<(Ns*Ns-1);g++)
324 lOmega = where((lg==g),Gamma(g)*lOmega,lOmega) ;
326 wils_prop = lOmega*wils_prop*adj(Omega) ;
329 QDPIO::cout <<
"Staggered Propagator coverted to Wilson: time= "
330 << swatch.getTimeInSeconds()
331 <<
" secs" << std::endl;
339 multi1d<Double> prop_corr=sumMulti(localNorm2(wils_prop),phases.
getSet());
341 push(xml_out,
"WilsonProp_correlator");
342 write(xml_out,
"wils_corr", prop_corr);
349 QDPIO::cout <<
"Start writing propagator info" << std::endl;
351 XMLBufferWriter file_xml;
352 push(file_xml,
"propagator");
356 XMLBufferWriter record_xml;
360 XMLReader xml_tmp(stag_record_xml,
"/SinkSmear");
362 push(record_xml,
"SinkSmear");
365 record_xml << xml_tmp;
369 XMLReader xml_tmp(stag_record_xml,
"/Propagator");
371 push(record_xml,
"Propagator");
374 record_xml << xml_tmp;
383 QDPIO::cout <<
"Propagator successfully updated" << std::endl;
385 catch (std::bad_cast)
401 << snoop.getTimeInSeconds()
402 <<
" secs" << std::endl;
Inline measurement factory.
Asqtad staggered fermion action.
Inline measurement of staggered-to-wilson conversion.
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.
InlineStagToWilsParams params
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 read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
std::string uniqueId()
Return a unique id.
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.
Inline construction of propagator.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
multi1d< LatticeFermion > s(Ncb)
Print out basic info about this program.
Fourier transform phase factor support.
struct Chroma::InlineStagToWilsParams::NamedObject_t named_obj
void writeXML(XMLWriter &xml_out, const std::string &path)
Propagator source construction parameters.
multi1d< int > getTSrce() const