9 int main(
int argc,
char *argv[])
15 const int foo[] = {2,2,2,2};
16 multi1d<int> nrow(
Nd);
18 Layout::setLattSize(nrow);
33 XMLReader paramtop(xml_in,
"/Remez");
34 read(paramtop,
"lowerMin", lower);
35 read(paramtop,
"upperMax", upper);
36 read(paramtop,
"numPower", power_num);
37 read(paramtop,
"denPower", power_den);
38 read(paramtop,
"degree", degree);
40 if( paramtop.count(
"prec") == 1 ) {
41 read(paramtop,
"prec", prec);
47 push(xml_out,
"RationalApprox");
48 write(xml_out,
"ratApproxType",
"READ_COEFFS");
51 push(xml_out,
"Param");
57 QDPIO::cout <<
"Caught Exception reading parameters: " <<
s << std::endl;
61 QDPIO::cout <<
"Caught unknown exception while processing input " << std::endl;
67 long multmp = power_num*power_den;
70 QDPIO::cout <<
"Either both num and den powers are + or both are -" << std::endl;
74 QDPIO::cout <<
"One of num or den powers is -" << std::endl;
77 unsigned long pn = power_num > 0 ? power_num : -power_num ;
78 unsigned long pd = power_den > 0 ? power_den : -power_den ;
81 Remez remez(lower, upper, prec);
85 QDPIO::cout <<
"Start getPFE" << std::endl;
95 QDPIO::cout <<
"Finished getPFE" << std::endl;
97 push(xml_out,
"ApproxInfo");
98 write(xml_out,
"lowerMin", lower);
99 write(xml_out,
"upperMax", upper);
100 write(xml_out,
"degree", degree);
101 write(xml_out,
"error", error);
104 push(xml_out,
"PFECoeffs");
110 QDPIO::cout <<
"Start getIPFE" << std::endl;
119 QDPIO::cout <<
"Finished getIPFE" << std::endl;
121 push(xml_out,
"IPFECoeffs");
129 QDPIO::cout <<
"Approximation with degree " << degree <<
" has maximum error=" << error << std::endl;
Primary include file for CHROMA in application codes.
Dummy class for case when gmp is not present.
RemezCoeff_t getPFE()
Return the partial fraction expansion of the approximation x^(pnum/pden)
RemezCoeff_t getIPFE()
Return the partial fraction expansion of the approximation x^(-pnum/pden)
const Real generateApprox(int num_degree, int den_degree, unsigned long power_num, unsigned long power_den)
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 proginfo(XMLWriter &xml)
Print out basic information about this program.
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
std::string getXMLInputFileName()
Get input file name.
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
multi1d< LatticeFermion > s(Ncb)
Convenient structure to package Remez coeffs.
int main(int argc, char *argv[])