CHROMA
t_precact_4d.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Test 4d fermion actions
3  */
4 
5 #include <iostream>
6 #include <cstdio>
7 
8 #include "chroma.h"
9 
10 #include "qdp_util.h"
11 
12 using namespace Chroma;
13 
14 
15 //! To insure linking of code, place the registered code flags here
16 /*! This is the bit of code that dictates what fermacts are in use */
18 {
19  bool foo = true;
20  // All actions
22  return foo;
23 }
24 
25 //! Check Qprop
26 void check_qprop(XMLWriter& xml_out, const std::string& prefix,
29 {
30  LatticeFermion source;
31  LatticeFermion sol_unprec;
32  LatticeFermion sol_prec;
33 
34  // Make some kind of source
35  gaussian(source);
36  Double s_norm = sqrt(norm2(source));
37  Real factor = Real(1)/Real(s_norm);
38  source *= factor;
39 
40  sol_prec=zero;
41  sol_unprec=zero;
42 
43  // Do solution one;
44  SystemSolverResults_t res1 = PP(sol_prec, source);
45  std::cout << "QPROP Prec done" << std::endl << std::flush ;
46 
47  SystemSolverResults_t res2 = UP(sol_unprec, source);
48 
49  LatticeFermion diff = sol_prec - sol_unprec;
50  Double norm_diff = sqrt(norm2(diff));
51 
52  QDPIO::cout << "Prop Diff: " << norm_diff << std::endl;
53  push(xml_out, prefix);
54  write(xml_out, "n_count1", res1.n_count);
55  write(xml_out, "n_count2", res2.n_count);
56  write(xml_out, "prop_diff", norm_diff);
57  pop(xml_out);
58 }
59 
60 
61 //! Check linops
62 void check_linops(XMLWriter& xml_out, const std::string& prefix,
63  const EvenOddPrecLinearOperator< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >& AP,
64  const UnprecLinearOperator< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >& AU)
65 {
66  QDPIO::cout << "Check linops" << std::endl;
67 
68  LatticeFermion psi, chi;
69  LatticeFermion tmpx, tmpy;
70 
71  gaussian(psi);
72  gaussian(chi);
73 
74  LatticeFermion tmp1, tmp2;
75  QDPIO::cout << "AP plus" << std::endl;
76  QDPIO::cout << "Checking evenEvenInv(PLUS): " << std::endl;
77  AP.evenEvenLinOp(tmpx, psi, PLUS);
78  AP.evenEvenInvLinOp(tmpy, tmpx, PLUS);
79  Double trivial_diff_plus = norm2(tmpy-psi,even);
80  QDPIO::cout << " psi - EvenEvenInv*EvenEven psi: diff = " << trivial_diff_plus
81  << " norm2(psi) = " << Real(norm2(psi,even)) << std::endl;
82 
83  AP.unprecLinOp(tmp1, psi, PLUS);
84  DComplex nnP_plus = innerProduct(chi, tmp1);
85 
86  QDPIO::cout << "AP minus" << std::endl;
87  QDPIO::cout << "Checking evenEvenInv(MINUS): " << std::endl;
88  AP.evenEvenLinOp(tmpx, psi, MINUS);
89  AP.evenEvenInvLinOp(tmpy, tmpx, MINUS);
90  Double trivial_diff_minus = norm2(tmpy-psi,even);
91  QDPIO::cout << " psi - EvenEvenInv*EvenEven psi: diff = " << trivial_diff_minus
92  << " norm2(psi) = " << Real(norm2(psi,even)) << std::endl;
93 
94  AP.unprecLinOp(tmp2, chi, MINUS);
95  DComplex nnP_minus = innerProduct(tmp2, psi);
96 
97  LatticeFermion tmp3, tmp4;
98  QDPIO::cout << "AU plus" << std::endl;
99  AU(tmp3, psi, PLUS);
100  DComplex nnU_plus = innerProduct(chi, tmp3);
101 
102  QDPIO::cout << "AU minus" << std::endl;
103  AU(tmp4, chi, MINUS);
104  DComplex nnU_minus = innerProduct(tmp4, psi);
105 
106  push(xml_out,prefix+"LinOpInnerprods");
107  write(xml_out, "trivial_diff_plus", trivial_diff_plus);
108  write(xml_out, "nnP_plus", nnP_plus);
109  write(xml_out, "nnU_plus", nnU_plus);
110  Double norm_diff_plus = zero;
111  Double norm_diff_plus_e = norm2(tmp1-tmp3,even);
112  Double norm_diff_plus_o = norm2(tmp1-tmp3,odd);
113  norm_diff_plus += norm_diff_plus_e + norm_diff_plus_o;
114  QDPIO::cout << "PLUS, EVEN: Prec(Full) - Unprec: diff = " << norm_diff_plus_e << std::endl;
115  QDPIO::cout << "PLUS, ODD: Prec(Full) - Unprec: diff = " << norm_diff_plus_o << std::endl;
116 
117  write(xml_out, "norm_diff_plus", norm_diff_plus);
118  write(xml_out, "norm_diff_plus_even", norm_diff_plus_e);
119  write(xml_out, "norm_diff_plus_odd", norm_diff_plus_o);
120 
121  write(xml_out, "trivial_diff_minus", trivial_diff_minus);
122  write(xml_out, "nnP_minus", nnP_minus);
123  write(xml_out, "nnU_minus", nnU_minus);
124  Double norm_diff_minus = zero;
125  Double norm_diff_minus_e = norm2(tmp2-tmp4,even);
126  Double norm_diff_minus_o = norm2(tmp2-tmp4, odd);
127  norm_diff_minus += norm_diff_minus_e + norm_diff_minus_o;
128  QDPIO::cout << "MINUS,EVEN: Prec(Full) - Unprec: diff = " << norm_diff_minus_e << std::endl;
129  QDPIO::cout << "MINUS,ODD: Prec(Full) - Unprec: diff = " << norm_diff_minus_o << std::endl;
130 
131  write(xml_out, "norm_diff_minus", norm_diff_minus);
132  write(xml_out, "norm_diff_minus_even", norm_diff_minus_e);
133  write(xml_out, "norm_diff_minus_odd", norm_diff_minus_o);
134  pop(xml_out);
135 }
136 
137 
138 //! Apply the operator onto a source std::vector
139 /*! User should make sure deriv routines do a resize */
140 multi1d<LatticeColorMatrix>
141 deriv(const EvenOddPrecLinearOperator<LatticeFermion,
142  multi1d<LatticeColorMatrix>,
143  multi1d<LatticeColorMatrix> >& AP,
144  const LatticeFermion& chi, const LatticeFermion& psi,
145  enum PlusMinus isign)
146 {
147  // Need deriv of (A_oo - D_oe*Ainv_ee*D_eo*psi_e)
148  enum PlusMinus msign = (isign == PLUS) ? MINUS : PLUS;
149 
150  //
151  // Make sure the deriv routines do a resize !!!
152  //
153  multi1d<LatticeColorMatrix> ds_u, ds_1;
154  LatticeFermion tmp1, tmp2, tmp3;
155 
156  //
157  // NOTE: even with even-odd decomposition, the ds_u will still have contributions
158  // on all cb. So, no adding of ds_1 onto ds_u under a subset
159  //
160  // ds_u = chi^dag * A'_oo * psi
161  AP.derivOddOddLinOp(ds_u, chi, psi, isign);
162 
163  // ds_u -= chi^dag * D'_oe * Ainv_ee * D_eo * psi_o
164  AP.evenOddLinOp(tmp1, psi, isign);
165  AP.evenEvenInvLinOp(tmp2, tmp1, isign);
166  AP.derivOddEvenLinOp(ds_1, chi, tmp2, isign);
167  ds_u -= ds_1;
168 
169  // ds_u += chi^dag * D_oe * Ainv_ee * A'_ee * Ainv_ee * D_eo * psi_o
170  AP.evenOddLinOp(tmp1, psi, isign);
171  AP.evenEvenInvLinOp(tmp2, tmp1, isign);
172  AP.evenOddLinOp(tmp1, chi, msign);
173  AP.evenEvenInvLinOp(tmp3, tmp1, msign);
174  AP.derivEvenEvenLinOp(ds_1, tmp3, tmp2, isign);
175  ds_u += ds_1;
176 
177  // ds_u -= chi^dag * D_oe * Ainv_ee * D'_eo * psi_o
178  AP.evenOddLinOp(tmp1, chi, msign);
179  AP.evenEvenInvLinOp(tmp3, tmp1, msign);
180  AP.derivEvenOddLinOp(ds_1, tmp3, psi, isign);
181  ds_u -= ds_1;
182 
183  return ds_u;
184 }
185 
186 
187 
188 //! Check linops
189 void check_derivs(XMLWriter& xml_out, const std::string& prefix,
190  const EvenOddPrecLinearOperator< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >& AP,
191  const UnprecLinearOperator< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >& AU)
192 {
193  QDPIO::cout << "Check derivs" << std::endl;
194 
195  LatticeFermion psi, chi;
196 
197  gaussian(psi);
198  gaussian(chi);
199 
200  multi1d<LatticeColorMatrix> ds_1, ds_2;
201  QDPIO::cout << "AP plus" << std::endl;
202  AP.derivUnprecLinOp(ds_1, chi, psi, PLUS);
203  Double nnP_plus = norm2(ds_1);
204 
205  QDPIO::cout << "AP minus" << std::endl;
206  AP.derivUnprecLinOp(ds_2, chi, psi, MINUS);
207  Double nnP_minus = norm2(ds_2);
208  Double norm_diff_prec = zero;
209  for(int m=0; m < Nd; ++m)
210  norm_diff_prec += norm2(ds_1[m]-ds_2[m]);
211 
212  multi1d<LatticeColorMatrix> ds_tmp;
213  AP.deriv(ds_tmp, chi, psi, PLUS);
214  ds_tmp -= deriv(AP, chi, psi, PLUS);
215  Double norm_diff_check_prec_plus = norm2(ds_tmp);
216 
217  AP.deriv(ds_tmp, chi, psi, MINUS);
218  ds_tmp -= deriv(AP, chi, psi, MINUS);
219  Double norm_diff_check_prec_minus = norm2(ds_tmp);
220 
221  multi1d<LatticeColorMatrix> ds_3, ds_4;
222  QDPIO::cout << "AU plus" << std::endl;
223  AU.deriv(ds_3, chi, psi, PLUS);
224  Double nnU_plus = norm2(ds_3);
225 
226  QDPIO::cout << "AP minus" << std::endl;
227  AU.deriv(ds_4, chi, psi, MINUS);
228  Double nnU_minus = norm2(ds_4);
229  Double norm_diff_unprec = zero;
230  for(int m=0; m < Nd; ++m)
231  norm_diff_unprec += norm2(ds_3[m]-ds_4[m]);
232 
233  push(xml_out,prefix+"DerivInnerprods");
234  write(xml_out, "norm_diff_check_prec_plus", norm_diff_check_prec_plus);
235  write(xml_out, "norm_diff_check_prec_minus", norm_diff_check_prec_minus);
236 
237  write(xml_out, "nnP_plus", nnP_plus);
238  write(xml_out, "nnU_plus", nnU_plus);
239  Double norm_diff_plus = zero;
240  for(int m=0; m < Nd; ++m)
241  norm_diff_plus += norm2(ds_1[m]-ds_3[m]);
242  write(xml_out, "norm_diff_plus", norm_diff_plus);
243  write(xml_out, "norm_diff_prec", norm_diff_plus);
244 
245  write(xml_out, "nnP_minus", nnP_minus);
246  write(xml_out, "nnU_minus", nnU_minus);
247  Double norm_diff_minus = zero;
248  for(int m=0; m < Nd; ++m)
249  norm_diff_minus += norm2(ds_2[m]-ds_4[m]);
250  write(xml_out, "norm_diff_minus", norm_diff_minus);
251  write(xml_out, "norm_diff_unprec", norm_diff_plus);
252  pop(xml_out);
253 }
254 
255 
256 /*
257  * Input
258  */
259 // Parameters which must be determined from the XML input
260 // and written to the XML output
261 struct Param_t
262 {
263  multi1d<int> nrow; // Lattice dimension
264  GroupXML_t invParam; // Inverter parameters
265 };
266 
267 //! Mega-structure of all input
268 struct Test_input_t
269 {
270  Param_t param;
271  Cfg_t cfg;
274 };
275 
276 //! Parameters for running code
277 void read(XMLReader& xml, const std::string& path, Param_t& param)
278 {
279  XMLReader paramtop(xml, path);
280  read(paramtop, "nrow", param.nrow);
281  param.invParam = readXMLGroup(paramtop, "InvertParam", "invType");
282 }
283 
284 
285 // Reader for input parameters
286 void read(XMLReader& xml, const std::string& path, Test_input_t& input)
287 {
288  XMLReader inputtop(xml, path);
289 
290  // Read all the input groups
291  try
292  {
293  // Read program parameters
294  read(inputtop, "Param", input.param);
295 
296  // Read in the gauge configuration info
297  read(inputtop, "Cfg", input.cfg);
298 
299  // Read unprec action stuff
300  {
301  XMLReader xml_action(inputtop, "UnprecAction");
302  std::ostringstream os;
303  xml_action.print(os);
304  input.action_un = os.str();
305  }
306 
307  // Read prec action stuff
308  {
309  XMLReader xml_action(inputtop, "PrecAction");
310  std::ostringstream os;
311  xml_action.print(os);
312  input.action_eo = os.str();
313  }
314  }
315  catch (const std::string& e)
316  {
317  QDPIO::cerr << "Error reading test data: " << e << std::endl;
318  throw;
319  }
320 }
321 
322 
323 
324 
325 int main(int argc, char **argv)
326 {
327  // Put the machine into a known state
328  Chroma::initialize(&argc, &argv);
329 
330  QDPIO::cout << "linkage=" << linkage_hack() << std::endl;
331 
332  // Input parameter structure
333  Test_input_t input;
334 
335  // Instantiate xml reader
336  XMLReader xml_in;
337 
338  // Read data
339  try
340  {
341  xml_in.open(Chroma::getXMLInputFileName());
342  read(xml_in, "/t_precact", input);
343  }
344  catch(const std::string& e)
345  {
346  QDPIO::cerr << "t_precact_4d: Caught Exception reading XML: " << e << std::endl;
347  QDP_abort(1);
348  }
349  catch(...)
350  {
351  QDPIO::cerr << "t_precact_4d: caught generic exception reading XML" << std::endl;
352  QDP_abort(1);
353  }
354 
355  // Specify lattice size, shape, etc.
356  Layout::setLattSize(input.param.nrow);
357  Layout::create();
358 
359  QDPIO::cout << "t_precact" << std::endl;
360 
361  // Read in the configuration along with relevant information.
362  multi1d<LatticeColorMatrix> u(Nd);
363  XMLReader gauge_file_xml, gauge_xml;
364 
365  // Start up the gauge field
366  gaugeStartup(gauge_file_xml, gauge_xml, u, input.cfg);
367 
368  // Instantiate XML writer for XMLDAT
369  XMLFileWriter& xml_out = Chroma::getXMLOutputInstance();
370  push(xml_out, "t_precact");
371 
372  proginfo(xml_out); // Print out basic program info
373 
374  // Write out the input
375  write(xml_out, "Input", xml_in);
376 
377  // Write out the config header
378  write(xml_out, "Config_info", gauge_xml);
379 
380  // Check if the gauge field configuration is unitarized
381  unitarityCheck(u);
382 
383  // Calculate some gauge invariant observables just for info.
384  MesPlq(xml_out, "Observables", u);
385  xml_out.flush();
386 
387  //
388  // Initialize fermion action
389  //
390  std::istringstream xml_s_eo(input.action_eo);
391  std::istringstream xml_s_un(input.action_un);
392  XMLReader fermacttop_eo(xml_s_eo);
393  XMLReader fermacttop_un(xml_s_un);
394  const std::string fermact_path_eo = "/PrecAction/FermionAction";
395  const std::string fermact_path_un = "/UnprecAction/FermionAction";
396  std::string fermact_eo;
397  std::string fermact_un;
398 
399  try
400  {
401  read(fermacttop_eo, fermact_path_eo + "/FermAct", fermact_eo);
402  read(fermacttop_un, fermact_path_un + "/FermAct", fermact_un);
403  }
404  catch (const std::string& e)
405  {
406  QDPIO::cerr << "Error reading fermact: " << e << std::endl;
407  throw;
408  }
409  catch (const char* e)
410  {
411  QDPIO::cerr << "Error reading fermact: " << e << std::endl;
412  throw;
413  }
414 
415  QDPIO::cout << "PrecFermAct = " << fermact_eo << std::endl;
416  QDPIO::cout << "UnprecFermAct = " << fermact_un << std::endl;
417 
418 
419  // Deal with auxiliary (and polymorphic) state information
420  // eigenvectors, eigenvalues etc. The XML for this should be
421  // stored as a std::string called "stateInfo" in the param struct.
422 
423  try {
424 
425  // Make a reader for the stateInfo
426  const std::string state_info_path_eo = "/PrecAction/StateInfo";
427  const std::string state_info_path_un = "/UnprecAction/StateInfo";
428  XMLReader state_info_xml_eo(fermacttop_eo,state_info_path_eo);
429  XMLReader state_info_xml_un(fermacttop_un,state_info_path_un);
430 
431  // Typedefs to save typing
432  typedef LatticeFermion T;
433  typedef multi1d<LatticeColorMatrix> P;
434  typedef multi1d<LatticeColorMatrix> Q;
435 
436  // Preconditioned operator
437  bool success = false;
438 
439  QDPIO::cerr << "create prec = " << fermact_eo << std::endl;
441 
443  S_f_eo(dynamic_cast<EO4D*>(TheWilsonTypeFermActFactory::Instance().createObject(fermact_eo,
444  fermacttop_eo,
445  fermact_path_eo)));
446 
447  Handle< FermState<T,P,Q> > state_eo(S_f_eo->createState(u,
448  state_info_xml_eo,
449  state_info_path_eo));
450 
451  // Unpreconditioned operator
452  QDPIO::cerr << "create unprec = " << fermact_un << std::endl;
453  typedef UnprecWilsonTypeFermAct<T,P,Q> U4D;
455  S_f_un(dynamic_cast<U4D*>(TheWilsonTypeFermActFactory::Instance().createObject(fermact_un,
456  fermacttop_un,
457  fermact_path_un)));
458 
459  Handle< FermState<T,P,Q> > state_un(S_f_un->createState(u,
460  state_info_xml_un,
461  state_info_path_un));
462 
463 
464  //-------------------------------------------------------------------------------
465  {
466  Handle< EvenOddPrecLinearOperator<T,P,Q> > AP(S_f_eo->linOp(state_eo));
467  Handle< UnprecLinearOperator<T,P,Q> > AU(S_f_un->linOp(state_un));
468 
469  QDPIO::cout << "Check bulk linops" << std::endl;
470  check_linops(xml_out, "Bulk", *AP, *AU);
471  xml_out.flush();
472 
473  Handle< SystemSolver<T> > PP = S_f_eo->qprop(state_eo,
474  input.param.invParam);
475 
476  QDPIO::cout << "Got Preconditioned System Solver" << std::endl;
477 
478  Handle< SystemSolver<T> > UP = S_f_un->qprop(state_un,
479  input.param.invParam);
480  QDPIO::cout << "Got Unprec System Solver " << std::endl;
481 
482  QDPIO::cout << "Check qprop" << std::endl;
483  check_qprop(xml_out, "Qprop", *PP, *UP);
484  xml_out.flush();
485 
486  QDPIO::cout << "Check bulk derivatives" << std::endl;
487  check_derivs(xml_out, "Bulk", *AP, *AU);
488  xml_out.flush();
489  }
490 
491  }
492  catch (const std::string& e)
493  {
494  QDPIO::cerr << "Error in t_precact: " << e << std::endl;
495  throw;
496  }
497  catch (const char* e)
498  {
499  QDPIO::cerr << "Error in t_precact: " << e << std::endl;
500  throw;
501  }
502 
503  pop(xml_out);
504 
505  // Time to bolt
507 
508  exit(0);
509 }
Primary include file for CHROMA in application codes.
Even-odd preconditioned linear operator.
Definition: eoprec_linop.h:92
Even-odd preconditioned Wilson-like fermion actions including derivatives.
Class for counted reference semantics.
Definition: handle.h:33
static T & Instance()
Definition: singleton.h:432
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Unpreconditioned Wilson-like fermion actions with derivatives.
Definition: fermact.orig.h:491
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
Definition: unit_check.cc:20
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
Definition: proginfo.cc:24
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
static int m[4]
Definition: make_seeds.cc:16
Nd
Definition: meslate.cc:74
Double tmp2
Definition: mesq.cc:30
Double tmp3
Definition: mesq.cc:31
multi1d< LatticeColorMatrix > P
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
@ MINUS
Definition: chromabase.h:45
@ PLUS
Definition: chromabase.h:45
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
multi1d< LatticeFermion > chi(Ncb)
std::string getXMLInputFileName()
Get input file name.
Definition: chroma_init.cc:88
LatticeFermion psi
Definition: mespbg5p_w.cc:35
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Definition: chroma_init.cc:359
Double zero
Definition: invbicg.cc:106
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979
Gauge configuration structure.
Definition: cfgtype_io.h:16
Hold group xml and type id.
Holds return info from SystemSolver call.
Definition: syssolver.h:17
Parameters for running program.
Definition: qpropadd.cc:17
SysSolverCGParams invParam
multi1d< int > nrow
Definition: qpropadd.cc:18
Mega-structure of all input.
Definition: t_dwf4d.cc:38
std::string action_un
std::string action_eo
Param_t param
Definition: t_dwf4d.cc:39
Cfg_t cfg
Definition: t_dwf4d.cc:40
void check_qprop(XMLWriter &xml_out, const std::string &prefix, const SystemSolver< LatticeFermion > &PP, const SystemSolver< LatticeFermion > &UP)
Check Qprop.
Definition: t_precact_4d.cc:26
bool linkage_hack()
To insure linking of code, place the registered code flags here.
Definition: t_precact_4d.cc:17
int main(int argc, char **argv)
void check_linops(XMLWriter &xml_out, const std::string &prefix, const EvenOddPrecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AP, const UnprecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AU)
Check linops.
Definition: t_precact_4d.cc:62
multi1d< LatticeColorMatrix > deriv(const EvenOddPrecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AP, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign)
Apply the operator onto a source std::vector.
void check_derivs(XMLWriter &xml_out, const std::string &prefix, const EvenOddPrecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AP, const UnprecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AU)
Check linops.