CHROMA
syssolver_linop_mdwf_array.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief DWF/SSE double-prec solver
4  */
5 
6 #ifndef SYSSOLVER_LINOP_MDWF_ARRAY_H
7 #define SYSSOLVER_LINOP_MDWF_ARRAY_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 
24  //! CG1 system solver namespace
25  namespace LinOpSysSolverMDWFArrayEnv
26  {
27  //! Register the syssolver
28  bool registerAll();
29  }
30 
31 
32  //! AVP's DWF Solver interface
33  /*!
34  * \ingroup invert
35  *
36  * @{
37  */
38  class LinOpSysSolverMDWFArray : public LinOpSystemSolverArray<LatticeFermion> {
39 
40  public:
41  typedef LatticeFermion T;
42  typedef multi1d<LatticeColorMatrix> P;
43  typedef multi1d<LatticeColorMatrix> Q;
44 
45  /* Constructor */
48  Handle< FermState<T,P,Q> > fs_,
49  const SysSolverMDWFParams& invParam_ )
50  : A(A_), invParam(invParam_) {
51 
52  // Resize arrays
53  b5_in.resize(invParam.N5);
54  c5_in.resize(invParam.N5);
55 
56  // Copy params
57  for(int s =0 ; s < invParam.N5; s++ ) {
58  b5_in[s] = toDouble(invParam.b5);
59  c5_in[s] = toDouble(invParam.c5);
60  }
61 
62  // Call Init Funcs
63  init(fs_);
64  }
65 
66 
67  /* Destructor */
69  fini(); state = NULL;
70  }
71 
72  //! Solver the linear system
73  /*!
74  * \param psi quark propagator ( Modify )
75  * \param chi source ( Read )
76  * \return number of CG iterations
77  */
78  SystemSolverResults_t operator() (multi1d<LatticeFermion>& psi,
79  const multi1d<LatticeFermion>& chi) const;
80 
81 
82 
83 
84  int size() const { return invParam.N5; }
85  const Subset& subset() const { return all; }
86 
87 
88  private:
89  // Handle< EvenOddPrecConstDetLinearOperatorArray<T,P,Q> > A;
92  multi1d<LatticeColorMatrix> u; // The gauge field suitably prepared
93  multi1d<double> b5_in;
94  multi1d<double> c5_in;
95 
96  // Internal Pointers
97  QOP_MDWF_State *state;
98  QOP_MDWF_Parameters *params;
99 
100  /* INIT Function */
101  void init(Handle< FermState<T,P,Q> > fermstate);
102 
103  /* Finalize -- Cleanup */
104  void fini(void);
105  };
106 
107 
108  /*! @} */ // end of group qprop
109 }
110 
111 
112 #endif
Anisotropy parameters.
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
const Subset & subset() const
Return the subset on which the operator acts.
int size() const
Expected length of array index.
Handle< LinearOperatorArray< T > > A
LinOpSysSolverMDWFArray(Handle< LinearOperatorArray< T > > A_, Handle< FermState< T, P, Q > > fs_, const SysSolverMDWFParams &invParam_)
SystemSolver disambiguator.
Linear Operator to arrays.
Definition: linearop.h:61
Even-odd const determinant Wilson-like fermact.
unsigned s
Definition: ldumul_w.cc:37
bool registerAll()
Register all the factories.
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
Holds return info from SystemSolver call.
Definition: syssolver.h:17