136 QDP_volfmt_t prop_volfmt;
150 multi1d<Component_t> components;
157 XMLReader top(xml,path);
163 QDPIO::cerr <<
"Caught Exception : " << e << std::endl;
167 QDPIO::cerr <<
"Component color >= Nc. color = " << comp.
color << std::endl;
171 if( comp.
spin < 0 || comp.
spin >= Ns ) {
172 QDPIO::cerr <<
"Component spin >= Ns. spin = " << comp.
spin << std::endl;
192 XMLReader inputtop(xml, path);
203 XMLReader inputtop(xml, path);
212 read(inputtop,
"Cfg", input.
cfg);
221 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
230 int main(
int argc,
char **argv)
244 read(xml_in,
"/propagatorComp", input);
247 QDPIO::cerr <<
"Caught exception " << e << std::endl;
252 Layout::setLattSize(input.
nrow);
255 QDPIO::cout <<
"propagatorComp" << std::endl;
258 multi1d<LatticeColorMatrix>
u(
Nd);
259 XMLReader gauge_file_xml, gauge_xml;
266 LatticePropagator quark_prop_source;
267 XMLReader source_file_xml, source_record_xml;
269 bool make_sourceP =
false;;
270 bool seqsourceP =
false;
273 QDPIO::cout <<
"Attempt to read source" << std::endl;
275 source_record_xml, quark_prop_source,
277 QDPIO::cout <<
"Forward propagator successfully read" << std::endl;
283 if (source_record_xml.count(
"/MakeSource") != 0)
287 read(source_record_xml,
"/MakeSource/PropSource", source_header);
290 else if (source_record_xml.count(
"/SequentialSource") != 0)
294 read(source_record_xml,
"/SequentialSource/SeqSource", seqsource_header);
302 QDPIO::cerr <<
"Error extracting source_header: " << e << std::endl;
313 push(xml_out,
"collectPropcomp");
318 write(xml_out,
"Input", xml_in);
321 write(xml_out,
"Config_info", gauge_xml);
324 write(xml_out,
"Source_file_info", source_file_xml);
325 write(xml_out,
"Source_record_info", source_record_xml);
327 push(xml_out,
"Output_version");
328 write(xml_out,
"out_version", 1);
338 MesPlq(xml_out,
"Observables",
u);
347 multi1d<Double> source_corr = sumMulti(localNorm2(quark_prop_source),
350 push(xml_out,
"Source_correlator");
351 write(xml_out,
"source_corr", source_corr);
363 LatticePropagator quark_prop;
365 XMLReader file_xml_in;
366 XMLReader record_xml_in;
374 else if (seqsourceP ) {
394 for(
int spin=start_spin; spin < end_spin; spin++) {
395 for(
int color=0; color < Nc; color++) {
396 std::ostringstream filename ;
400 QDPIO::cout <<
"Attempting to read " << filename.str() << std::endl;
404 filename.str(), QDPIO_SERIAL);
420 for(
int color_source = 0; color_source < Nc ; ++color_source)
422 for(
int spin_source = Ns/2; spin_source < Ns; ++spin_source)
434 for(
int color_source = 0; color_source < Nc ; ++color_source)
436 for(
int spin_source = 0; spin_source < Ns/2; ++spin_source)
449 multi1d<Double> prop_corr = sumMulti(localNorm2(quark_prop),
454 push(xml_out,
"Prop_correlator");
455 write(xml_out,
"Mass", input.
param.FermActHandle->getMass());
456 write(xml_out,
"prop_corr", prop_corr);
463 XMLBufferWriter file_xml;
464 push(file_xml,
"propagator");
466 write(file_xml,
"id",
id);
471 XMLBufferWriter record_xml;
480 XMLReader xml_tmp(source_record_xml,
"/MakeSource");
482 push(record_xml,
"Propagator");
483 write(record_xml,
"ForwardProp", input.
param);
484 record_xml << xml_tmp;
487 else if (seqsourceP) {
488 XMLReader xml_tmp(source_record_xml,
"/SequentialSource");
490 push(record_xml,
"SequentialProp");
492 record_xml << xml_tmp;
497 QDPIO::cout <<
"Attempting to write " << input.
prop.
prop_file << std::endl;
Primary include file for CHROMA in application codes.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
int main(int argc, char **argv)
void PropToFerm(const LatticePropagatorF &b, LatticeFermionF &a, int color_index, int spin_index)
Extract a LatticeFermion from a LatticePropagator.
void FermToProp(const LatticeFermionF &a, LatticePropagatorF &b, int color_index, int spin_index)
Insert a LatticeFermion into a LatticePropagator.
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.
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
std::map< std::string, SinkPropContainer_t > prop
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
void readQprop(XMLReader &file_xml, XMLReader &record_xml, LatticePropagator &quark_prop, const std::string &file, QDP_serialparallel_t serpar)
Read a Chroma propagator.
void writeQprop(XMLBufferWriter &file_xml, XMLBufferWriter &record_xml, const LatticePropagator &quark_prop, const std::string &file, QDP_volfmt_t volfmt, QDP_serialparallel_t serpar)
Write a Chroma propagator.
std::string getXMLInputFileName()
Get input file name.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
void readFermion(XMLReader &file_xml, XMLReader &record_xml, LatticeFermion &fermion, const std::string &file, QDP_serialparallel_t serpar)
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Gauge configuration structure.
QuarkSpinType quarkSpinType
Propagator source construction parameters.
Sequential source parameters.