CHROMA
syssolver_mdagm_qop_mg_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: syssolver_linop_qdp_mg.h, v1.0 2012-04-05 20:45 sdcohen $
3 /*! \file
4  * \brief Make contact with the QDP clover multigrid solver, transfer
5  * the gauge field, generate the coarse grids, solve systems
6  */
7 
8 #ifndef __syssolver_mdagm_qdp_mg_h__
9 #define __syssolver_mdagm_qdp_mg_h__
10 #include "chroma_config.h"
11 #include "handle.h"
12 #include "syssolver.h"
13 #include "linearop.h"
17 
19 
20 
21 namespace Chroma
22 {
23 
24  //! QDP multigrid system solver namespace
25  namespace MdagMSysSolverQOPMGEnv
26  {
27  //! Register the syssolver
28  bool registerAll();
29  }
30 
31 
32  //! Solve a M*psi=chi linear system using the external QDP multigrid inverter
33  /*! \ingroup invert
34  */
35 
36  class MdagMSysSolverQOPMG : public MdagMSystemSolver<LatticeFermion>
37  {
38  public:
39  typedef LatticeFermion T;
40  typedef LatticeColorMatrix U;
41  typedef multi1d<LatticeColorMatrix> Q;
42 
43  //! Constructor
44  /*!
45  * \param A_ Linear operator ( Read )
46  * \param state_ The ferm State (Read)
47  * \param invParam inverter parameters ( Read )
48  */
50  Handle< FermState<T,Q,Q> > state_,
51  const SysSolverQOPMGParams& invParam_);
52 
53  //! Destructor finalizes the QDP environment
55 
56  //! Return the subset on which the operator acts
57  const Subset& subset() const {return A->subset();}
58 
59  //! Solver the linear system
60  /*!
61  * \param psi solution ( Modify )
62  * \param chi source ( Read )
63  * \return syssolver results
64  */
65  SystemSolverResults_t operator() (T& psi, const T& chi) const;
67  const T& chi,
68  AbsChronologicalPredictor4D<T>& predictor) const;
69 
70 
71  private:
72  // Hide default constructor
77 
78  //LinOpSysSolverQOPMG<T> Dinv ;
79  Handle< LinOpSysSolverQOPMG> Dinv; // NB: Balint removed <T> template from LinOpSolver as it was causing hassle
80  //Handle< LinOpSystemSolver<T> > Dinv;
81  };
82 
83 } // End namespace
84 
85 #endif
86 
Abstract interface for a Chronological Solution predictor.
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Linear Operator.
Definition: linearop.h:27
Solve a M*psi=chi linear system using the external QDP multigrid inverter.
multi1d< LatticeColorMatrix > Q
Handle< LinOpSysSolverQOPMG > Dinv
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solver the linear system.
~MdagMSysSolverQOPMG()
Destructor finalizes the QDP environment.
const Subset & subset() const
Return the subset on which the operator acts.
Handle< LinearOperator< T > > A
Handle< FermState< T, Q, Q > > state
SystemSolver disambiguator.
Class for counted reference semantics.
Linear Operators.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
Parameters for the external QDP multigrid inverter.
Holds return info from SystemSolver call.
Definition: syssolver.h:17
Linear system solvers.
Disambiguator for LinOp system solvers.
Make contact with the QDP clover multigrid solver, transfer the gauge field, generate the coarse grid...
Disambiguator for MdagM system solvers.
Parameters for the external QDP clover multigrid solver.