14 int main(
int argc,
char **argv)
20 const int foo[] = {4,2,2,2};
21 multi1d<int> nrow(
Nd);
23 Layout::setLattSize(nrow);
26 XMLFileWriter xml(
"t_precact.xml");
27 push(xml,
"t_precact");
30 multi1d<LatticeColorMatrix>
u(
Nd);
37 invParam.
RsdCG = 1.0e-6;
38 invParam.
MaxCG = 3000;
43 XMLBufferWriter xml_buf;
44 write(xml_buf,
"InvertParam", invParam);
45 XMLReader xml_in(xml_buf);
46 inv_param =
readXMLGroup(xml_in,
"/InvertParam",
"invType");
50 const int bnd[] = {1,1,1,-1};
51 multi1d<int> boundary(
Nd);
58 Real WilsonMass = 1.1;
72 multi1d<LatticeFermion> psi5a(
N5), psi5b(
N5), chi5(
N5), tmp1(
N5);
73 for(
int m=0;
m <
N5; ++
m)
80 QDPIO::cout <<
"Prec inverter: " << std::endl;
81 QDPIO::cout <<
" iterations = " << (*QDPqpropT)(psi5a, chi5) << std::endl;
82 QDPIO::cout <<
"SSE prec inverter" << std::endl;
83 QDPIO::cout <<
" iterations = " << (*SSEqpropT)(psi5b, chi5) << std::endl;
85 for(
int m=0;
m <
N5; ++
m)
86 tmp1[
m] = psi5a[
m] - psi5b[
m];
88 QDPIO::cout <<
"Test eo-prec and SSE opt eo-prec DWF qpropT" << std::endl
89 <<
"|pDWF|^2 = " << norm2(psi5a) << std::endl
90 <<
"|sDWF|^2 = " << norm2(psi5b) << std::endl
91 <<
"|pDWF - sDWF|^2 = " << norm2(tmp1) << std::endl;
99 LatticeFermion
chi, psia, psib;
104 QDPIO::cout <<
"Prec inverter" << std::endl;
105 QDPIO::cout <<
" iterations = " << (*qprop)(psia,
chi) << std::endl;
106 QDPIO::cout <<
"SSE prec inverter" << std::endl;
107 QDPIO::cout <<
" iterations = " << (*qprop)(psib,
chi) << std::endl;
109 QDPIO::cout <<
"Test eo-prec and SSE opt eo-prec DWF qprop" << std::endl
110 <<
"|pDWF|^2 = " << norm2(psia) << std::endl
111 <<
"|sDWF|^2 = " << norm2(psib) << std::endl
112 <<
"|pDWF - sDWF|^2 = " << norm2(psia-psib) << std::endl;
115 QDPIO::cout <<
"\n\n\nDone" << std::endl;
Primary include file for CHROMA in application codes.
4D style even-odd preconditioned domain-wall fermion action
virtual EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Override to produce a DWF-link even-odd prec. linear operator for this action.
SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Define quark propagator routine for 4D fermions.
Even-odd preconditioned linear operator.
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.
Propagator of a generic even-odd preconditioned 5D fermion linear operator.
Concrete class for all gauge actions with simple boundary conditions.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void HotSt(multi1d< LatticeColorMatrix > &u)
Set a gauge field from a sample of (almost) Haar measure.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
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.
multi1d< LatticeFermion > chi(Ncb)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Hold group xml and type id.
int main(int argc, char **argv)