CHROMA
syssolver_linop_eigcg.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Solve a M*psi=chi linear system by EigCG
3  */
4 
8 
11 
12 namespace Chroma
13 {
14 
15  //! Eigenstd::vector accelerated CG system solver namespace
16  namespace LinOpSysSolverEigCGEnv
17  {
18  //! Anonymous namespace
19  namespace
20  {
21  //! Name to be used
22  const std::string name("EIG_CG_INVERTER");
23 
24  //! Local registration flag
25  bool registered = false;
26  }
27 
28 
29 
30  //! Callback function
32  const std::string& path,
33  Handle< FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > > state,
35  {
38  xml_in,
39  path,
40  state,
41  A));
42 
43  return new LinOpSysSolverEigCG<LatticeFermion>(A, mdagmSysSolver);
44  }
45 
46 #if 0
47  //! Callback function
49  const std::string& path,
51  {
54  xml_in,
55  path,
56  A));
57 
58  return new LinOpSysSolverEigCG<LatticeStaggeredFermion>(A, mdagmSysSolver);
59  }
60 #endif
61 
62  //! Register all the factories
63  bool registerAll()
64  {
65  bool success = true;
66  if (! registered)
67  {
69 // success &= Chroma::TheLinOpStagFermSystemSolverFactory::Instance().registerObject(name, createStagFerm);
70  registered = true;
71  }
72  return success;
73  }
74  }
75 
76 
77 }
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Solve a M*psi=chi linear system by EigCG with eigenvectors.
static T & Instance()
Definition: singleton.h:432
static bool registered
Local registration flag.
const std::string name
Name to be used.
LinOpSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
Callback function.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
A(A, psi, r, Ncb, PLUS)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
::std::string string
Definition: gtest.h:1979
Register linop system solvers that solve M*psi=chi.
Solve a M*psi=chi linear system by EigCG.
Factory for solving M*psi=chi where M is not hermitian or pos. def.
Register MdagM system solvers.
Factory for producing system solvers for MdagM*psi = chi.