22 BinaryFileReader cfg_in(file);
27 multi1d<int> lattsize_cb = Layout::lattSize();
31 for(
int s=0;
s <
q.size(); ++
s)
33 for(
int cb=0;
cb < 2; ++
cb)
35 for(
int sitecb=0; sitecb < Layout::vol()/2; ++sitecb)
37 multi1d<int>
coord = crtesn(sitecb, lattsize_cb);
41 for(
int m=1;
m<
Nd;
m++)
57 int main(
int argc,
char **argv)
63 const int foo[] = {4,4,4,4};
64 multi1d<int> nrow(
Nd);
66 Layout::setLattSize(nrow);
69 XMLFileWriter xml(
"t_neflinop.xml");
70 push(xml,
"t_neflinop");
73 multi1d<LatticeColorMatrix>
u(
Nd);
75 for(
int m=0;
m <
u.size(); ++
m)
83 const int bnd[] = {1,1,1,1};
84 multi1d<int> boundary(
Nd);
90 Real WilsonMass = 1.5;
96 for(
int m=0;
m <
N5; ++
m)
99 for(
int m=0;
m <
N5; ++
m)
123 multi1d<LatticeFermion> tmp1(
N5);
125 multi1d<LatticeFermion>
tmp2(
N5);
130 multi1d<LatticeFermion> diff(
N5);
131 for(
int m=0;
m <
N5; ++
m)
138 for(
int m=1;
m <
N5; ++
m)
143 for(
int m=1;
m <
N5; ++
m)
148 push(xml,
"innerprods");
149 write(xml,
"norm_psi" , Real(norm2(
psi )));
150 write(xml,
"norm_chi" , Real(norm2(
chi )));
151 write(xml,
"norm_tmp1", Real(norm2(tmp1)));
152 write(xml,
"norm_tmp2", Real(norm2(
tmp2)));
153 write(xml,
"norm_diff", Real(norm2(diff)));
154 write(xml,
"nn1", nn1);
155 write(xml,
"nn2", nn2);
178 multi1d<LatticeFermion> tmp1(
N5);
180 multi1d<LatticeFermion>
tmp2(
N5);
183 (*Anef).unprecLinOp(savePrec,
psi,
PLUS);
185 for(
int m=0;
m <
N5; ++
m){
186 tmp2[
m][rb[0]] = tmp1[
m] ;
189 multi1d<LatticeFermion> diff(
N5);
190 for(
int m=0;
m <
N5; ++
m)
197 for(
int m=1;
m <
N5; ++
m)
202 for(
int m=1;
m <
N5; ++
m)
207 push(xml,
"prec_innerprods");
208 write(xml,
"norm_psi" , Real(norm2(
psi )));
209 write(xml,
"norm_chi" , Real(norm2(
chi )));
212 write(xml,
"norm_diff", Real(norm2(diff)));
213 write(xml,
"nn1", nn1);
214 write(xml,
"nn2", nn2);
218 for(
int m=0;
m <
N5; ++
m)
219 tt[
m] = savePrec[
m]- saveUprec[
m] ;
221 push(xml,
"prec_minus_unprec_innerprods");
222 write(xml,
"norm_Prec_minus_Uprec", Real(norm2(tt)));
244 multi1d<LatticeFermion> tmp1(
N5);
245 multi1d<LatticeFermion>
tmp2(
N5),diff_ee(
N5), diff_oo(
N5),diff_eo(
N5) ;
246 multi1d<LatticeFermion> diff_oe(
N5),diff_inv_ee(
N5),diff_inv_oo(
N5) ;
248 (*Adwf).evenEvenLinOp(tmp1,
psi,
PLUS);
251 for(
int m=0;
m <
N5; ++
m)
254 (*Adwf).oddOddLinOp(tmp1,
psi,
PLUS);
257 for(
int m=0;
m <
N5; ++
m)
260 (*Adwf).evenEvenInvLinOp(tmp1,
psi,
PLUS);
263 for(
int m=0;
m <
N5; ++
m)
264 diff_inv_ee[
m] =
tmp2[
m]-tmp1[
m] ;
266 (*Adwf).evenOddLinOp(tmp1,
psi,
PLUS);
269 for(
int m=0;
m <
N5; ++
m)
272 (*Adwf).oddEvenLinOp(tmp1,
psi,
PLUS);
275 for(
int m=0;
m <
N5; ++
m)
278 push(xml,
"prec_pieces_PLUS");
279 write(xml,
"norm_ee" , Real(norm2(diff_ee)));
280 write(xml,
"norm_oo" , Real(norm2(diff_oo)));
281 write(xml,
"norm_eo" , Real(norm2(diff_eo)));
282 write(xml,
"norm_oe" , Real(norm2(diff_oe)));
284 write(xml,
"norm_inv_ee" , Real(norm2(diff_inv_ee)));
288 (*Adwf).evenEvenLinOp(tmp1,
psi,
MINUS);
291 for(
int m=0;
m <
N5; ++
m)
294 (*Adwf).oddOddLinOp(tmp1,
psi,
MINUS);
297 for(
int m=0;
m <
N5; ++
m)
300 (*Adwf).evenEvenInvLinOp(tmp1,
psi,
MINUS);
303 for(
int m=0;
m <
N5; ++
m)
304 diff_inv_ee[
m] =
tmp2[
m]-tmp1[
m] ;
306 (*Adwf).evenOddLinOp(tmp1,
psi,
MINUS);
309 for(
int m=0;
m <
N5; ++
m)
312 (*Adwf).oddEvenLinOp(tmp1,
psi,
MINUS);
315 for(
int m=0;
m <
N5; ++
m)
318 push(xml,
"prec_pieces_MINUS");
319 write(xml,
"norm_ee" , Real(norm2(diff_ee)));
320 write(xml,
"norm_oo" , Real(norm2(diff_oo)));
321 write(xml,
"norm_eo" , Real(norm2(diff_eo)));
322 write(xml,
"norm_oe" , Real(norm2(diff_oe)));
324 write(xml,
"norm_inv_ee" , Real(norm2(diff_inv_ee)));
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.
4D style even-odd preconditioned domain-wall fermion action
4D style even-odd preconditioned Overlap-DWF (Borici) action
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 domain-wall fermion action.
virtual UnprecDWLikeLinOpBaseArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Override to produce a DWF-link unprec. linear operator for this action.
Unpreconditioned NEF fermion action.
Unpreconditioned Overlap-style (Borici) OvDWF fermion action.
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 readSzinFerm(LatticeFermion &q, const std::string &file)
Read a SZIN fermion. This is a simple memory dump reader.
void readSzin(SzinGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Read a SZIN configuration file.
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
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)
multi1d< LatticeFermion > s(Ncb)
int main(int argc, char **argv)