26 XMLReader inputtop(xml, path);
35 read(inputtop,
"Cfg", input.
cfg);
39 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
45 int main(
int argc,
char **argv)
54 read(xml_in,
"/BiCGStabTest", input);
57 QDPIO::cerr <<
"Caught Exception : " << e << std::endl;
63 Layout::setLattSize(input.
param.nrow);
66 multi1d<LatticeColorMatrix>
u(
Nd);
67 XMLReader gauge_file_xml, gauge_xml;
71 push(xml_out,
"BiCGStabTest");
75 MesPlq(xml_out,
"Observables",
u);
79 typedef LatticeFermion
T;
80 typedef multi1d<LatticeColorMatrix>
P;
81 typedef multi1d<LatticeColorMatrix>
Q;
91 switch (input.
param.FermActHandle->getFermActType() ) {
96 QDPIO::cout <<
"FERM_ACT_WILSON" << std::endl;
102 case FERM_ACT_UNPRECONDITIONED_WILSON:
106 QDPIO::cout <<
"FERM_ACT_UNPRECONDITIONED_WILSON" << std::endl;
111 case FERM_ACT_ZOLOTAREV_4D:
113 QDPIO::cout <<
"FERM_ACT_ZOLOTAREV_4D" << std::endl;
114 const Zolotarev4DFermActParams& zolo4d =
dynamic_cast<const Zolotarev4DFermActParams&
> (*(input.
param.FermActHandle));
118 S_f_ptr =
new Zolotarev4DFermAct(fbc, zolo4d, xml_out);
122 case FERM_ACT_ZOLOTAREV_5D:
124 QDPIO::cout <<
"FERM_ACT_ZOLOTAREV_5D" << std::endl;
125 const Zolotarev5DFermActParams& zolo5d =
dynamic_cast<const Zolotarev5DFermActParams&
> (*(input.
param.FermActHandle));
129 S_f_a_ptr =
new Zolotarev5DFermActArray(fbc, fbc, zolo5d, xml_out);
135 const DWFFermActParams& dwf =
dynamic_cast<const DWFFermActParams&
>(*(input.
param.FermActHandle));
137 QDPIO::cout <<
"FERM_ACT_DWF" << std::endl;
139 dwf.chiralParam.OverMass,
145 case FERM_ACT_UNPRECONDITIONED_DWF:
147 const DWFFermActParams& dwf =
dynamic_cast<const DWFFermActParams&
>(*(input.
param.FermActHandle));
149 QDPIO::cout <<
"FERM_ACT_UNPRECONDITONED_DWF" << std::endl;
151 dwf.chiralParam.OverMass,
157 QDPIO::cerr <<
"Unsupported fermion action" << std::endl;
161 QDPIO::cout <<
"Ferm Act Created " << std::endl;
171 switch(input.
param.FermActHandle->getFermActType()) {
172 case FERM_ACT_WILSON:
173 state_ptr =
S_f->createState(
u);
175 case FERM_ACT_UNPRECONDITIONED_WILSON:
176 state_ptr =
S_f->createState(
u);
179 state_ptr = S_f_a->createState(
u);
181 case FERM_ACT_UNPRECONDITIONED_DWF:
182 state_ptr = S_f_a->createState(
u);
185 case FERM_ACT_ZOLOTAREV_4D:
187 const Zolotarev4DFermActParams& zolo4d =
dynamic_cast<const Zolotarev4DFermActParams&
> (*(input.
param.FermActHandle));
188 const Zolotarev4DFermAct& S_zolo4 =
dynamic_cast<const Zolotarev4DFermAct&
>(*S_f);
190 state_ptr = S_zolo4.createState(
u, zolo4d.StateInfo, xml_out,zolo4d.AuxFermActHandle->getMass());
194 case FERM_ACT_ZOLOTAREV_5D:
196 const Zolotarev5DFermActParams& zolo5d =
dynamic_cast<const Zolotarev5DFermActParams&
> (*(input.
param.FermActHandle));
197 const Zolotarev5DFermActArray& S_zolo5 =
dynamic_cast<const Zolotarev5DFermActArray&
>(*S_f_a);
200 state_ptr = S_zolo5.createState(
u, zolo5d.StateInfo, xml_out, zolo5d.AuxFermActHandle->getMass());
205 QDPIO::cerr <<
"Unsupported fermion action (state creation)" << std::endl;
213 QDPIO::cout <<
"ConnectState Created" << std::endl;
215 switch(input.
param.FermActHandle->getFermActType()) {
216 case FERM_ACT_WILSON:
217 case FERM_ACT_UNPRECONDITIONED_WILSON:
218 case FERM_ACT_ZOLOTAREV_4D:
223 const Subset&
s = D->subset();
244 QDPIO::cout <<
" || chi - D psi || / || chi || = " << sqrt(norm2(
r,
s))/
chi_norm << std::endl;
248 case FERM_ACT_UNPRECONDITIONED_DWF:
249 case FERM_ACT_ZOLOTAREV_5D:
254 const Subset&
s = (*D).subset();
258 multi1d<LatticeFermion>
psi(N);
259 multi1d<LatticeFermion>
chi(N);
261 for(
int n=0;
n < N;
n++) {
277 multi1d<LatticeFermion>
r(N);
280 for(
int n=0;
n < N;
n++) {
284 QDPIO::cout <<
" || chi - D psi || / || chi || = " << sqrt(norm2(
r,
s))/
chi_norm << std::endl;
289 QDPIO::cerr <<
"Unsupported fermion action (state creation)" << std::endl;
Primary include file for CHROMA in application codes.
4D style even-odd preconditioned domain-wall fermion action
Even-odd preconditioned Wilson fermion action.
Support class for fermion actions and linear operators.
Base class for quadratic matter actions (e.g., fermions)
Class for counted reference semantics.
Concrete class for all gauge actions with simple boundary conditions.
Unpreconditioned domain-wall fermion action.
Unpreconditioned Wilson fermion action.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
Conjugate-Gradient algorithm for a generic Linear Operator.
multi1d< LatticeColorMatrix > P
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
SystemSolverResults_t InvBiCGStab(const LinearOperator< LatticeFermionF > &A, const LatticeFermionF &chi, LatticeFermionF &psi, const Real &RsdBiCGStab, int MaxBiCGStab, enum PlusMinus isign)
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.
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Gauge configuration structure.
Params for wilson ferm acts.
int main(int argc, char **argv)