CHROMA
eoprec_slic_linop_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Even-odd preconditioned Clover fermion linear operator
4  */
5 
6 #ifndef __prec_slic_linop_w_h__
7 #define __prec_slic_linop_w_h__
8 
9 #include "state.h"
10 #include "fermbc.h"
13 #include "eoprec_logdet_linop.h"
17 
18 namespace Chroma
19 {
20  //! Even-odd preconditioned SLIC-Dirac operator
21  /*!
22  * \ingroup linop
23  *
24  * This routine is specific to Wilson fermions!
25  *
26  * The kernel for SLIC fermions is
27  *
28  * M = A + (d+M) - (1/2) D'
29  */
30  class EvenOddPrecSLICLinOp : public EvenOddPrecLogDetLinearOperator<LatticeFermion,
31  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
32  {
33  public:
34  // Typedefs to save typing
35  typedef LatticeFermion T;
36  typedef multi1d<LatticeColorMatrix> P;
37  typedef multi1d<LatticeColorMatrix> Q;
38 
39  //! Partial constructor
41 
42  //! Full constructor
44  const CloverFermActParams& param_);
45 
46  //! Destructor is automatic
48 
49  //! Return the fermion BC object for this linear operator
50  const FermBC<T,P,Q>& getFermBC() const {return D_pl.getFermBC();}
51 
52  //! Creation routine
53  void create(Handle< FermState<T,P,Q> > fs,
54  const CloverFermActParams& param_);
55 
56  //! Apply the the even-even block onto a source std::vector
57  void evenEvenLinOp(LatticeFermion& chi, const LatticeFermion& psi,
58  enum PlusMinus isign) const;
59 
60  //! Apply the inverse of the even-even block onto a source std::vector
61  void evenEvenInvLinOp(LatticeFermion& chi, const LatticeFermion& psi,
62  enum PlusMinus isign) const;
63 
64  //! Apply the the even-odd block onto a source std::vector
65  void evenOddLinOp(LatticeFermion& chi, const LatticeFermion& psi,
66  enum PlusMinus isign) const;
67 
68  //! Apply the the odd-even block onto a source std::vector
69  void oddEvenLinOp(LatticeFermion& chi, const LatticeFermion& psi,
70  enum PlusMinus isign) const;
71 
72  //! Apply the the odd-odd block onto a source std::vector
73  void oddOddLinOp(LatticeFermion& chi, const LatticeFermion& psi,
74  enum PlusMinus isign) const;
75 
76  // Override inherited one with a few more funkies
77  void operator()(LatticeFermion& chi, const LatticeFermion& psi,
78  enum PlusMinus isign) const;
79 
80  //! Apply the even-even block onto a source std::vector
81  void derivEvenEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
82  const LatticeFermion& chi, const LatticeFermion& psi,
83  enum PlusMinus isign) const;
84 
85  void derivLogDetEvenEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
86  enum PlusMinus isign) const;
87 
88  //! Apply the the even-odd block onto a source std::vector
89  void derivEvenOddLinOp(multi1d<LatticeColorMatrix>& ds_u,
90  const LatticeFermion& chi, const LatticeFermion& psi,
91  enum PlusMinus isign) const;
92 
93  //! Apply the the odd-even block onto a source std::vector
94  void derivOddEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
95  const LatticeFermion& chi, const LatticeFermion& psi,
96  enum PlusMinus isign) const;
97 
98  //! Apply the the odd-odd block onto a source std::vector
99  void derivOddOddLinOp(multi1d<LatticeColorMatrix>& ds_u,
100  const LatticeFermion& chi, const LatticeFermion& psi,
101  enum PlusMinus isign) const;
102 
103  //! Return flops performed by the operator()
104  unsigned long nFlops() const;
105 
106  //! Get the log det of the even even part
107  Double logDetEvenEvenLinOp(void) const ;
108 
109  private:
117  CloverTerm invclov; // uggh, only needed for evenEvenLinOp
118  };
119 
120 } // End Namespace Chroma
121 
122 
123 #endif
Even-odd preconditioned linear operator.
Even-odd preconditioned SLIC-Dirac operator.
multi1d< LatticeColorMatrix > P
Handle< FermState< T, P, Q > > fs_mn
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply even-odd preconditioned Clover fermion linear operator.
EvenOddPrecSLICLinOp()
Partial constructor.
~EvenOddPrecSLICLinOp()
Destructor is automatic.
void derivOddOddLinOp(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the odd-odd block onto a source std::vector.
Double logDetEvenEvenLinOp(void) const
Get the log det of the even even part.
void derivLogDetEvenEvenLinOp(multi1d< LatticeColorMatrix > &ds_u, enum PlusMinus isign) const
Apply the even-even block onto a source std::vector.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
void evenEvenLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the even-even block onto a source std::vector.
multi1d< LatticeColorMatrix > Q
void derivOddEvenLinOp(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the odd-even block onto a source std::vector.
void derivEvenEvenLinOp(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the even-even block onto a source std::vector.
void derivEvenOddLinOp(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the even-odd block onto a source std::vector.
void oddEvenLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the odd-even block onto a source std::vector.
void create(Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
Creation routine.
Handle< FermState< T, P, Q > > fs_pl
void evenEvenInvLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the inverse of the even-even block onto a source std::vector.
void evenOddLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the even-odd block onto a source std::vector.
void oddOddLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the odd-odd block onto a source std::vector.
Handle< FermState< T, P, Q > > slic_fs
unsigned long nFlops() const
Return flops performed by the operator()
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
General Wilson-Dirac dslash.
Definition: lwldslash_w.h:48
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Definition: lwldslash_w.h:92
Parameters for Clover fermion action.
Include possibly optimized Clover terms.
Include possibly optimized Wilson dslash.
Preconditioned Linear Operators where the Even Even part depends on the gauge field.
Fermion action boundary conditions.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
FloatingPoint< double > Double
Definition: gtest.h:7351
Simple ferm state and a creator.
Support class for fermion actions and linear operators.
Stout field state for stout links and a creator.
Params for clover ferm acts.