CHROMA
syssolver_mdagm_mr.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Solve a MdagM*psi=chi linear system by MR
3  */
4 
7 
9 
10 namespace Chroma
11 {
12 
13  //! MR system solver namespace
14  namespace MdagMSysSolverMREnv
15  {
16  //! Callback function
18  const std::string& path,
19  Handle< FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > > state,
20 
22  {
23  return new MdagMSysSolverMR<LatticeFermion>(A, SysSolverMRParams(xml_in, path));
24  }
25 
26  //! Callback function
28  const std::string& path,
29  Handle< FermState< LatticeFermionF, multi1d<LatticeColorMatrixF>, multi1d<LatticeColorMatrixF> > > state,
30 
32  {
33  return new MdagMSysSolverMR<LatticeFermionF>(A, SysSolverMRParams(xml_in, path));
34  }
35 
36  //! Callback function
38  const std::string& path
39  Handle< FermState< LatticeFermionD, multi1d<LatticeColorMatrixD>, multi1d<LatticeColorMatrixD> > > state,
40 
42  {
43  return new MdagMSysSolverMR<LatticeFermionD>(A, SysSolverMRParams(xml_in, path));
44  }
45 
46  //! Name to be used
47  const std::string name("MR_INVERTER");
48 
49  //! Local registration flag
50  static bool registered = false;
51 
52  //! Register all the factories
53  bool registerAll()
54  {
55  bool success = true;
56  if (! registered)
57  {
61 
62 
63  registered = true;
64  }
65  return success;
66  }
67  }
68 }
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Solve a MR system. Here, the operator is NOT assumed to be hermitian.
static T & Instance()
Definition: singleton.h:432
bool registerAll()
Register all the factories.
static bool registered
Local registration flag.
MdagMSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
Callback function.
MdagMSystemSolver< LatticeFermionF > * createFermF(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermionF, multi1d< LatticeColorMatrixF >, multi1d< LatticeColorMatrixF > > > state, Handle< LinearOperator< LatticeFermionF > > A)
Callback function.
const std::string name("MR_INVERTER")
Name to be used.
MdagMSystemSolver< LatticeFermionD > * createFermD(XMLReader &xml_in, const std::string &path Handle< FermState< LatticeFermionD, multi1d< LatticeColorMatrixD >, multi1d< LatticeColorMatrixD > > > state, Handle< LinearOperator< LatticeFermionD > > 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 MdagM system solvers.
Factory for producing system solvers for MdagM*psi = chi.
Solve a MdagM*psi=chi linear system by MR.