34 XMLReader paramtop(xml, path);
36 read(paramtop,
"Param/Mass", param.
Mass);
38 read(paramtop,
"Param/nrow", param.
nrow);
39 read(paramtop,
"Param/rng", param.
seed);
40 read(paramtop,
"Param/Neig", param.
Neig);
41 read(paramtop,
"Cfg", param.
cfg);
45 int main(
int argc,
char **argv)
54 read(xml_in,
"/ReadEigen", input);
57 QDPIO::cerr <<
"Caught Exception: " << e << std::endl;
62 Layout::setLattSize(input.
nrow);
68 QDPIO::cout <<
"ReadEigen" << std::endl;
70 multi1d<LatticeColorMatrix>
u(
Nd);
71 XMLReader gauge_file_xml, gauge_xml;
76 QDPIO::cout <<
"Reading SZIN Gauge config" << std::endl;
81 QDPIO::cout <<
"Reading SZIN QIO gauge config" << std::endl;
86 QDPIO::cout <<
"Reading NERSC gauge config" << std::endl;
94 push(xml_out,
"ReadEigen");
99 MesPlq(xml_out,
"Observables",
u);
112 multi1d<Real> lambda_lo(input.
Neig);
114 multi1d<LatticeFermion> eigv_lo(input.
Neig);
117 readEigen(header, lambda_lo, eigv_lo, lambda_hi,
119 input.
Neig,QDPIO_SERIAL);
121 write(xml_out,
"lambda", lambda_lo);
122 write(xml_out,
"lambda_hi", lambda_hi);
130 (*H)(Me, eigv_lo[
i],
PLUS);
132 LatticeFermion lambda_e;
134 lambda_e = lambda_lo[
i]*eigv_lo[
i];
135 LatticeFermion
r_norm = Me - lambda_e;
136 check_norm[
i] = sqrt(norm2(
r_norm))/fabs(lambda_lo[
i]);
139 write(xml_out,
"check_norm", check_norm);
Primary include file for CHROMA in application codes.
virtual FermState< T, P, Q > * createState(const Q &q) const
Given links (coordinates Q) create the state needed for the linear operators.
Class for counted reference semantics.
Concrete class for all gauge actions with simple boundary conditions.
Unpreconditioned Wilson fermion action.
LinearOperator< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Produce the gamma_5 hermitian operator H_w.
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 readGauge(XMLReader &file_xml, XMLReader &record_xml, multi1d< LatticeColorMatrix > &u, const std::string &file, QDP_serialparallel_t serpar)
Read a gauge config in QIO format.
void readEigen(ChromaWilsonRitz_t &header, multi1d< Real > &lambda_lo, multi1d< LatticeFermion > &eigv_lo, Real &lambda_hi, const std::string &filename_stem, int Neig, QDP_serialparallel_t serpar)
void readSzin(SzinGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Read a SZIN configuration file.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
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.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Various parameter structs and reader/writers.
Gauge configuration structure.
Struct for the overall application.
Struct for dumping the eigenvalues/vectors.
EigenIO_t eigen_io_params
int main(int argc, char **argv)