15 #define MRES_CALCULATION
24 QDP_volfmt_t prop_volfmt;
38 multi1d<Component_t> components;
44 XMLReader top(xml,path);
50 QDPIO::cerr <<
"Caught Exception : " << e << std::endl;
54 QDPIO::cerr <<
"Component color >= Nc. color = " << comp.
color << std::endl;
58 if( comp.
spin < 0 || comp.
spin >= Ns ) {
59 QDPIO::cerr <<
"Component spin >= Ns. spin = " << comp.
spin << std::endl;
79 XMLReader inputtop(xml, path);
90 XMLReader inputtop(xml, path);
99 read(inputtop,
"Cfg", input.
cfg);
108 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
116 XMLReader& source_record_xml,
118 XMLReader& gauge_xml,
120 const multi1d<LatticeFermion>&
psi);
129 int main(
int argc,
char **argv)
143 read(xml_in,
"/multiPropagatorComp", input);
146 Layout::setLattSize(input.
param.nrow);
149 QDPIO::cout <<
"multiPropagatorComp" << std::endl;
152 multi1d<LatticeColorMatrix>
u(
Nd);
153 XMLReader gauge_file_xml, gauge_xml;
158 LatticePropagator quark_prop_source;
159 XMLReader source_file_xml, source_record_xml;
163 source_record_xml, quark_prop_source,
172 read(source_record_xml,
"/MakeSource/PropSource", source_header);
176 QDPIO::cerr <<
"Error extracting source_header: " << e << std::endl;
183 push(xml_out,
"multiPropagatorComp");
188 write(xml_out,
"Input", xml_in);
191 write(xml_out,
"Config_info", gauge_xml);
194 write(xml_out,
"Source_file_info", source_file_xml);
195 write(xml_out,
"Source_record_info", source_record_xml);
197 push(xml_out,
"Output_version");
198 write(xml_out,
"out_version", 1);
208 MesPlq(xml_out,
"Observables",
u);
217 multi1d<Double> source_corr = sumMulti(localNorm2(quark_prop_source),
220 push(xml_out,
"Source_correlator");
221 write(xml_out,
"source_corr", source_corr);
241 multi1d<LatticeFermion>
psi(num_mass);
247 switch (input.
param.FermActHandle->getFermActType()) {
253 case FERM_ACT_ZOLOTAREV_4D:
255 QDPIO::cout <<
"FERM_ACT_ZOLOTAREV_4D" << std::endl;
256 const Zolotarev4DFermActParams& zolo4d =
dynamic_cast<const Zolotarev4DFermActParams&
> (*(input.
param.FermActHandle));
260 S_f_ptr =
new Zolotarev4DFermAct(zolo4d, xml_out);
264 QDPIO::cerr <<
"Unsupported fermion action" << std::endl;
276 switch(input.
param.FermActHandle->getFermActType()) {
277 case FERM_ACT_ZOLOTAREV_4D:
279 const Zolotarev4DFermActParams& zolo4d =
dynamic_cast<const Zolotarev4DFermActParams&
> (*(input.
param.FermActHandle));
280 const Zolotarev4DFermAct& S_zolo4 =
dynamic_cast<const Zolotarev4DFermAct&
>(*S_f);
282 state_ptr = S_zolo4.createState(
u, zolo4d.StateInfo, xml_out,zolo4d.AuxFermActHandle->getMass());
287 QDPIO::cerr <<
"Unsupported fermion action (state creation)" << std::endl;
296 for(
int comp = 0; comp < input.
components.size(); comp++) {
304 for(
int i=0;
i < num_mass;
i++) {
309 Real fact = Real(1) / sqrt(norm2(
chi));
317 switch(input.
param.FermActHandle->getFermActType()) {
318 case FERM_ACT_ZOLOTAREV_4D:
320 const Zolotarev4DFermAct& S=
dynamic_cast<const Zolotarev4DFermAct&
>(*S_f);
331 QDPIO::cerr <<
"Fermion action unsupported " << std::endl;
336 fact = Real(1) / fact;
337 for(
int i=0;
i < num_mass;
i++) {
342 push(xml_out,
"Relaxation_Iterations");
371 XMLReader& source_record_xml,
373 XMLReader& gauge_xml,
375 const multi1d<LatticeFermion>&
psi)
383 for(
int m=0;
m < num_mass;
m++) {
385 multi1d<Double> prop_corr = sumMulti(localNorm2(
psi[
m]),
388 push(xml_out,
"PropComp_correlator");
389 write(xml_out,
"Number",
m);
391 write(xml_out,
"prop_corr", prop_corr);
394 XMLBufferWriter file_xml;
395 push(file_xml,
"propagatorComponent");
397 write(file_xml,
"id",
id);
402 XMLBufferWriter record_xml;
403 push(record_xml,
"PropagatorComponent");
414 write(record_xml,
"ForwardProp", out_param);
415 XMLReader xml_tmp(source_record_xml,
"/MakeSource");
416 record_xml << xml_tmp;
417 write(record_xml,
"Component", component);
421 std::ostringstream outfile;
422 outfile <<
prop.prop_file <<
"_component_s" << component.
spin
423 <<
"_c" << component.
color <<
"_"
424 << std::setw(3) << std::setfill(
'0') <<
m;
426 QDPIO::cout <<
"Attempting to write " << outfile.str() << std::endl;
430 outfile.str(),
prop.prop_volfmt, QDPIO_SERIAL);
Primary include file for CHROMA in application codes.
Support class for fermion actions and linear operators.
Base class for quadratic matter actions (e.g., fermions)
Class for counted reference semantics.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
void PropToFerm(const LatticePropagatorF &b, LatticeFermionF &a, int color_index, int spin_index)
Extract a LatticeFermion from 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
void saveComponents(const ChromaMultiProp_t ¶m, const Prop_t &prop, XMLReader &source_record_xml, const Component_t &component, XMLReader &gauge_xml, XMLWriter &xml_out, const multi1d< LatticeFermion > &psi)
int main(int argc, char **argv)
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.
multi1d< LatticeFermion > chi(Ncb)
std::string getXMLInputFileName()
Get input file name.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
void writeFermion(XMLBufferWriter &file_xml, XMLBufferWriter &record_xml, const LatticeFermion &fermion, const std::string &file, QDP_volfmt_t volfmt, QDP_serialparallel_t serpar)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
Gauge configuration structure.
Multi-propagator parameters.
multi1d< Real > MultiMasses
Propagator source construction parameters.