15 XMLReader inputtop(xml, path);
21 read(inputtop,
"Cfg", input.
cfg);
27 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
33 int main(
int argc,
char **argv)
42 read(xml_in,
"/NEFTest", input);
45 QDPIO::cerr <<
"Caught Exception : " << e << std::endl;
51 Layout::setLattSize(input.
nrow);
54 multi1d<LatticeColorMatrix>
u(
Nd);
56 XMLReader gauge_file_xml, gauge_xml;
61 push(xml_out,
"NEFTest");
65 MesPlq(xml_out,
"Observables",
u);
80 QDPIO::cout <<
"Znef size = " << S_znef.
size() << std::endl;
81 QDPIO::cout <<
"Nef size = " << S_nef.
size() << std::endl;
90 multi1d<LatticeFermion> psi5a(
N5);
91 multi1d<LatticeFermion> chi5(
N5);
92 multi1d<LatticeFermion> psi5b(
N5);
93 multi1d<LatticeFermion> tmp5(
N5);
95 for(
int n=0;
n<
N5;
n++)
102 (*M_z)(psi5a, chi5,
PLUS);
103 (*M_n)(psi5b, chi5,
PLUS);
104 for(
int n=0;
n <
N5; ++
n)
106 tmp5[
n][M_z->subset()] = psi5a[
n];
107 tmp5[
n][M_z->subset()] -= psi5b[
n];
109 QDPIO::cout <<
"PLUS: norm2(psi5a-psi5b)=" << norm2(tmp5,M_z->subset()) << std::endl;
111 (*M_z)(psi5a, chi5,
MINUS);
112 (*M_n)(psi5b, chi5,
MINUS);
113 for(
int n=0;
n <
N5; ++
n)
115 tmp5[
n][M_z->subset()] = psi5a[
n];
116 tmp5[
n][M_z->subset()] -= psi5b[
n];
118 QDPIO::cout <<
"MINUS: norm2(psi5a-psi5b)=" << norm2(tmp5,M_z->subset()) << std::endl;
129 (*U_z)(psi5a, chi5,
PLUS);
130 (*U_n)(psi5b, chi5,
PLUS);
131 for(
int n=0;
n <
N5; ++
n)
133 tmp5[
n][U_z->subset()] = psi5a[
n];
134 tmp5[
n][U_z->subset()] -= psi5b[
n];
136 QDPIO::cout <<
"PLUS: norm2(psi5a-psi5b)=" << norm2(tmp5,U_z->subset()) << std::endl;
138 (*U_z)(psi5a, chi5,
MINUS);
139 (*U_n)(psi5b, chi5,
MINUS);
140 for(
int n=0;
n <
N5; ++
n)
142 tmp5[
n][U_z->subset()] = psi5a[
n];
143 tmp5[
n][U_z->subset()] -= psi5b[
n];
145 QDPIO::cout <<
"MINUS: norm2(psi5a-psi5b)=" << norm2(tmp5,U_z->subset()) << std::endl;
152 multi1d<LatticeFermion> psi5a(
N5);
153 multi1d<LatticeFermion> chi5(
N5);
154 multi1d<LatticeFermion> psi5b(
N5);
155 multi1d<LatticeFermion> tmp5(
N5);
157 for(
int n=0;
n<
N5;
n++)
164 int n_counta = (*ZQ)(psi5a, chi5);
165 int n_countb = (*NQ)(psi5b, chi5);
167 for(
int n=0;
n<
N5;
n++)
168 tmp5[
n] = psi5b[
n] - psi5a[
n];
170 QDPIO::cout <<
"norm(qpropT_diff)=" << Real(norm2(tmp5))
171 <<
" norm2(psi5a)=" << Real(norm2(psi5a))
172 <<
" norm2(psi5b)=" << Real(norm2(psi5b))
174 for(
int n=0;
n <
N5; ++
n)
176 QDPIO::cout <<
"QpropT:"
177 <<
" norm2(tmp5[" <<
n <<
"])= " << Real(norm2(tmp5[
n]))
178 <<
" norm2(psi5a[])= " << Real(norm2(psi5a[
n]))
179 <<
" norm2(psi5b[])= " << Real(norm2(psi5b[
n]))
184 push(xml_out,
"QpropT");
185 write(xml_out,
"psi5a",psi5a);
186 write(xml_out,
"psi5b",psi5b);
187 write(xml_out,
"tmp5",tmp5);
196 LatticeFermion psia, psib,
chi;
201 int n_counta = (*ZQ)(psia,
chi);
202 int n_countb = (*NQ)(psib,
chi);
204 QDPIO::cout <<
"norm(qprop_diff)=" << Real(norm2(psib - psia))
205 <<
" norm2(psia)=" << Real(norm2(psia))
206 <<
" norm2(psib)=" << Real(norm2(psib))
Primary include file for CHROMA in application codes.
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.
4D style even-odd preconditioned domain-wall fermion action
UnprecDWLikeLinOpBaseArray< T, P, Q > * unprecLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an unpreconditioned linear operator for this action with arbitrary quark mass.
int size() const
Length of DW flavor index/space.
virtual SystemSolverArray< T > * qpropT(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return quark prop solver, solution of unpreconditioned system.
EvenOddPreconditioned NEF fermion action.
UnprecDWLikeLinOpBaseArray< T, P, Q > * unprecLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an unpreconditioned linear operator for this action with arbitrary quark mass.
int size() const
Length of DW flavor index/space.
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.
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 gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
Handle< FermBC< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the FermionAction readers.
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)
std::string getXMLInputFileName()
Get input file name.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Gauge configuration structure.
Hold group xml and type id.
int main(int argc, char **argv)