CHROMA
mdwf_solver.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief DWF/SSE double-prec solver
4  */
5 
6 #ifndef MDWF_SOLVER_H
7 #define MDWF_SOLVER_H
8 
9 
10 extern "C" {
11  struct QOP_MDWF_State;
12  struct QOP_MDWF_Parameters;
13 };
14 
16 #include "io/aniso_io.h"
18 
19 
20 using namespace QDP;
21 namespace Chroma
22 {
23  //! AVP's DWF Solver interface
24  /*!
25  * \ingroup qprop
26  *
27  * @{
28  */
29  class MDWFQpropT : public SystemSolverArray<LatticeFermion> {
30 
31  public:
32  typedef LatticeFermion T;
33  typedef multi1d<LatticeColorMatrix> P;
34  typedef multi1d<LatticeColorMatrix> Q;
35 
36  /* Constructor */
38  Handle< LinOpSystemSolverArray<T> > invA_, // throw away
39  Handle< FermState<T,P,Q> > state_,
40  const Real& OverMass_,
41  const Real& Mass_,
42  const AnisoParam_t& anisoParam_,
43  const GroupXML_t& invParam_) : A(A_),
44  OverMass(OverMass_),
45  Mass(Mass_),
46  N5(A->size()),
47  anisoParam(anisoParam_) {
48  init(state_, invParam_);
49  }
50 
51 
52  /* Destructor */
54  fini(); state = NULL;
55  }
56 
57  //! Solver the linear system
58  /*!
59  * \param psi quark propagator ( Modify )
60  * \param chi source ( Read )
61  * \return number of CG iterations
62  */
63  SystemSolverResults_t operator() (multi1d<LatticeFermion>& psi,
64  const multi1d<LatticeFermion>& chi) const;
65 
66 
67 
68 
69  int size() const { return N5; }
70  const Subset& subset() const { return all; }
71 
72 
73  private:
75  Real OverMass; // M5
76  Real Mass; // m_f
77  int N5; // The 5th Dimension
78  AnisoParam_t anisoParam; // Anisotropy
79  SysSolverCGParams invParam; // Inverter Parameters
80  multi1d<LatticeColorMatrix> u; // The gauge field suitably prepared
81 
82  // Internal Pointers
83  QOP_MDWF_State *state;
84  QOP_MDWF_Parameters *params;
85 
86  /* INIT Function */
87  void init(Handle< FermState<T,P,Q> > fermstate, const GroupXML_t& inv);
88 
89  /* Finalize -- Cleanup */
90  void fini(void);
91  };
92 
93 
94  /*! @} */ // end of group qprop
95 }
96 
97 
98 #endif
Anisotropy parameters.
Even-odd preconditioned linear operator including derivatives for arrays.
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
SystemSolver disambiguator.
AVP's DWF Solver interface.
Definition: mdwf_solver.h:29
int size() const
Expected length of array index.
Definition: mdwf_solver.h:69
multi1d< LatticeColorMatrix > Q
Definition: mdwf_solver.h:34
AnisoParam_t anisoParam
Definition: mdwf_solver.h:78
LatticeFermion T
Definition: mdwf_solver.h:32
Handle< EvenOddPrecConstDetLinearOperatorArray< T, P, Q > > A
Definition: mdwf_solver.h:74
SysSolverCGParams invParam
Definition: mdwf_solver.h:79
multi1d< LatticeColorMatrix > P
Definition: mdwf_solver.h:33
const Subset & subset() const
Return the subset on which the operator acts.
Definition: mdwf_solver.h:70
MDWFQpropT(Handle< EvenOddPrecConstDetLinearOperatorArray< T, P, Q > > A_, Handle< LinOpSystemSolverArray< T > > invA_, Handle< FermState< T, P, Q > > state_, const Real &OverMass_, const Real &Mass_, const AnisoParam_t &anisoParam_, const GroupXML_t &invParam_)
Definition: mdwf_solver.h:37
QOP_MDWF_State * state
Definition: mdwf_solver.h:83
QOP_MDWF_Parameters * params
Definition: mdwf_solver.h:84
multi1d< LatticeColorMatrix > u
Definition: mdwf_solver.h:80
Linear system solvers of arrays.
Definition: syssolver.h:62
Even-odd const determinant Wilson-like fermact.
Real Mass
void init(MesonSpecData_t &data, XMLWriter &xml, const std::string &path, const std::string &id_tag, const Params &params)
Do some initialization.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
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
chi
Definition: pade_trln_w.cc:24
psi
Definition: pade_trln_w.cc:191
Parameters for anisotropy.
Definition: aniso_io.h:24
Hold group xml and type id.
Params for CG inverter.
Holds return info from SystemSolver call.
Definition: syssolver.h:17
Solve a CG1 system.