35 XMLReader inputtop(xml, path);
42 XMLReader inputtop(xml, path);
51 XMLReader xml_tmp(inputtop,
"FermionAction");
52 std::ostringstream os;
57 read(inputtop,
"Cfg", input.
cfg);
60 if( inputtop.count(
"StateInfo") == 1 ) {
61 XMLReader xml_state_info(inputtop,
"StateInfo");
62 std::ostringstream os;
63 xml_state_info.print(os);
67 XMLBufferWriter s_i_xml;
68 push(s_i_xml,
"StateInfo");
78 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
85 int main(
int argc,
char **argv)
96 read(xml_in,
"/mres4D", input);
99 QDPIO::cerr <<
"Caught Exception : " << e << std::endl;
105 Layout::setLattSize(input.
nrow);
108 multi1d<LatticeColorMatrix>
u(
Nd);
109 XMLReader gauge_file_xml, gauge_xml;
113 push(xml_out,
"t_mres4D");
116 write(xml_out,
"Input", xml_in);
119 MesPlq(xml_out,
"Observables",
u);
124 LatticePropagator quark_propagator;
129 XMLReader prop_file_xml, prop_record_xml;
140 read(prop_record_xml,
"/Propagator/PropSource", source_header);
143 QDPIO::cerr <<
"Error extracting forward_prop header: " << e << std::endl;
156 multi1d<Double> forward_prop_corr = sumMulti(localNorm2(quark_propagator),
159 push(xml_out,
"Forward_prop_correlator");
160 write(xml_out,
"forward_prop_corr", forward_prop_corr);
168 std::istringstream xml_s(input.
fermact);
169 XMLReader fermacttop(xml_s);
175 read(fermacttop, fermact_path +
"/FermAct", fermact);
179 QDPIO::cerr <<
"Error reading fermact: " << e << std::endl;
183 QDPIO::cout <<
"FermAct = " << fermact << std::endl;
186 std::istringstream state_info_is(input.
stateInfo);
187 XMLReader state_info_xml(state_info_is);
192 LatticePropagator delta_prop;
193 LatticePropagator deltaSq_prop;
228 for(
int col = 0; col < Nc; col++)
230 for(
int spin = 0; spin < Ns; spin++)
232 LatticeFermion tmp1,
tmp2;
235 PropToFerm(quark_propagator, tmp1, col, spin);
248 QDPIO::cout <<
"Wilson Factory Error: " << e << std::endl;
251 catch(std::bad_cast) {
252 QDPIO::cout <<
"Action entered is not suitable to be cast to OverlapFermActBase " << std::endl;
257 multi1d<Double> pseudo_prop_corr = sumMulti(localNorm2(quark_propagator),
260 multi1d<DComplex> delta_prop_corr = sumMulti(trace(adj(quark_propagator)*delta_prop),
263 multi1d<DComplex> deltaSq_prop_corr = sumMulti(trace(adj(delta_prop)*delta_prop),
266 int length = pseudo_prop_corr.size();
267 multi1d<Real> shifted_pseudo(length);
268 multi1d<Real> shifted_delta(length);
269 multi1d<Real> shifted_deltaSq(length);
272 for(
int t=0;
t<length;
t++){
273 int t_eff( (
t - t_src + length) % length ) ;
274 shifted_pseudo[t_eff] = real(pseudo_prop_corr[
t]);
275 shifted_delta[t_eff] = real(delta_prop_corr[
t]);
276 shifted_deltaSq[t_eff]= real(deltaSq_prop_corr[
t]);
279 push(xml_out,
"DeltaProp_correlator");
280 write(xml_out,
"delta_prop_corr", shifted_delta);
283 push(xml_out,
"DeltaSqProp_correlator");
284 write(xml_out,
"delta_sq_prop_corr", shifted_deltaSq);
287 push(xml_out,
"PsuedoPseudo_correlator");
288 write(xml_out,
"pseudo_prop_corr", shifted_pseudo);
Primary include file for CHROMA in application codes.
Base class for quadratic matter actions (e.g., fermions)
Class for counted reference semantics.
Base class for unpreconditioned overlap-like fermion actions.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
Wilson-like fermion actions.
virtual LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const =0
Produce a DeltaLs = 1-epsilon^2(H) operator.
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 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.
ForwardProp_t prop_header
bool registerAll()
Register all the factories.
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.
std::string getXMLInputFileName()
Get input file name.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
Gauge configuration structure.
Propagator source construction parameters.
bool linkage_hack()
To insure linking of code, place the registered code flags here.
int main(int argc, char **argv)