CHROMA
syssolver_linop_mr.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Solve a M*psi=chi linear system by MR
3  */
4 
7 
9 
10 namespace Chroma
11 {
12 
13  //! MR system solver namespace
14  namespace LinOpSysSolverMREnv
15  {
16  //! Callback function
18  const std::string& path,
19  Handle< FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > > state,
21  {
22  return new LinOpSysSolverMR<LatticeFermion>(A, SysSolverMRParams(xml_in, path));
23  }
24 
25  //! Callback function
27  XMLReader& xml_in,
28  const std::string& path,
30  {
32  }
33 
34  //! Name to be used
35  const std::string name("MR_INVERTER");
36 
37  //! Local registration flag
38  static bool registered = false;
39 
40  //! Register all the factories
41  bool registerAll()
42  {
43  bool success = true;
44  if (! registered)
45  {
48  registered = true;
49  }
50  return success;
51  }
52  }
53 }
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 MR.
static T & Instance()
Definition: singleton.h:432
LinOpSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
Callback function.
const std::string name("MR_INVERTER")
Name to be used.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
LinOpSystemSolver< LatticeStaggeredFermion > * createStagFerm(XMLReader &xml_in, const std::string &path, Handle< LinearOperator< LatticeStaggeredFermion > > A)
Callback function.
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
Params for MR inverter.
Register linop system solvers that solve M*psi=chi.
Factory for solving M*psi=chi where M is not hermitian or pos. def.
Solve a M*psi=chi linear system by MR.