18 XMLReader inputtop(xml, path);
39 namespace InlineQpropDiffEnv
75 XMLReader paramtop(xml_in, path);
77 if (paramtop.count(
"Frequency") == 1)
82 if ( paramtop.count(
"Label") == 1)
93 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
120 push(xml_out,
"qprop_diff");
121 write(xml_out,
"update_no", update_no);
123 QDPIO::cout <<
"QPROP_DIFF: Check differnce of two props component by component" << std::endl;
131 XMLReader propA_file_xml, propA_record_xml;
133 LatticePropagator propA ;
134 LatticePropagator propB ;
136 QDPIO::cout <<
"Snarf the props from a named buffer" << std::endl;
147 catch (std::bad_cast)
149 QDPIO::cerr <<
name <<
": caught dynamic cast error"
155 QDPIO::cerr <<
name <<
": error extracting source_header: " << e << std::endl;
159 for(
int spin=0; spin < Ns; ++spin){
160 for(
int color=0; color < Nc; ++color ) {
161 LatticeFermion fermA=
zero;
162 LatticeFermion fermB=
zero;
165 LatticeFermion diff = fermA - fermB;
166 Double diff_L2=sqrt(norm2(diff));
168 Double A_L2 = sqrt(norm2(fermA));
170 Double B_L2 = sqrt(norm2(fermB));
172 QDPIO::cout <<
"QPROP_DIFF: "<<
params.
label <<
": spin="<<spin<<
" col="<<color
173 <<
" ||diff||="<<diff_L2
174 <<
" ||diff||/||A||=" << diff_L2/A_L2
175 <<
" ||diff||/||B||="<<diff_L2/B_L2 << std::endl;
178 QDPIO::cout <<
"QPROP_DIFF: spin="<<spin<<
" col="<<color
179 <<
" ||diff||_inf="<<diff_Linf
180 <<
" ||diff||_inf/||A||_inf=" << diff_Linf/A_Linf
181 <<
" ||diff||_inf/||B||_inf="<<diff_Linf/B_Linf << std::endl;
184 QDPIO::cout << std::endl;
191 QDPIO::cout <<
"QPROP_DIFF: ran successfully" << std::endl;
Inline measurement factory.
Inline measurement of to add two props.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
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.
Inline measurement of qpropadd.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
FloatingPoint< double > Double
void writeXML(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineQpropDiffEnv::Params::NamedObject_t named_obj