CHROMA
eoprec_slrc_linop_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Even-odd preconditioned Clover linear operator (fat-relevant, thin-irrelevant terms)
4  *
5  * Here, the relevant terms are smeared and the irrelevant terms are not smeared.
6  * Code provided by Thomas Kaltenbrunner.
7  *
8  */
9 
10 #ifndef __eoprec_slrc_linop_w_h__
11 #define __eoprec_slrc_linop_w_h__
12 
13 #include "state.h"
14 #include "fermbc.h"
16 
17 #include "eoprec_logdet_linop.h"
21 
22 namespace Chroma
23 {
24  //! Even-odd preconditioned SLRC-Dirac operator
25  /*!
26  * \ingroup linop
27  *
28  * Here, the relevant terms are smeared and the irrelevant terms are not smeared.
29  * The kernel for SLRC fermions is
30  *
31  * M = A + (d+M) - (1/2) D'
32  */
33  class EvenOddPrecSLRCLinOp : public EvenOddPrecLogDetLinearOperator<LatticeFermion,
34  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
35  {
36  public:
37  // Typedefs to save typing
38  typedef LatticeFermion T;
39  typedef multi1d<LatticeColorMatrix> P;
40  typedef multi1d<LatticeColorMatrix> Q;
41 
42  //! Partial constructor
44 
45  //! Full constructor
47  const CloverFermActParams& param_) : slrc_fs(fs)
48  {create(fs, param_);}
49 
50  //! Destructor is automatic
52 
53  //! Return the fermion BC object for this linear operator
54  const FermBC<T,P,Q>& getFermBC() const {return *(slrc_fs->getFermBC());}
55 
56  //! Creation routine
57  void create(Handle< FermState<T,P,Q> > fs,
58  const CloverFermActParams& param_);
59 
60  //! Apply the the even-even block onto a source std::vector
61  void evenEvenLinOp(LatticeFermion& chi, const LatticeFermion& psi,
62  enum PlusMinus isign) const;
63 
64  //! Apply the inverse of the even-even block onto a source std::vector
65  void evenEvenInvLinOp(LatticeFermion& chi, const LatticeFermion& psi,
66  enum PlusMinus isign) const;
67 
68  //! Apply the the even-odd block onto a source std::vector
69  void evenOddLinOp(LatticeFermion& chi, const LatticeFermion& psi,
70  enum PlusMinus isign) const;
71 
72  //! Apply the the odd-even block onto a source std::vector
73  void oddEvenLinOp(LatticeFermion& chi, const LatticeFermion& psi,
74  enum PlusMinus isign) const;
75 
76  //! Apply the the odd-odd block onto a source std::vector
77  void oddOddLinOp(LatticeFermion& chi, const LatticeFermion& psi,
78  enum PlusMinus isign) const;
79 
80  // Override inherited one with a few more funkies
81  void operator()(LatticeFermion& chi, const LatticeFermion& psi,
82  enum PlusMinus isign) const;
83 
84  //! Apply the even-even block onto a source std::vector
85  void derivEvenEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
86  const LatticeFermion& chi, const LatticeFermion& psi,
87  enum PlusMinus isign) const;
88 
89  void derivLogDetEvenEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
90  enum PlusMinus isign) const;
91 
92  //! Apply the the even-odd block onto a source std::vector
93  void derivEvenOddLinOp(multi1d<LatticeColorMatrix>& ds_u,
94  const LatticeFermion& chi, const LatticeFermion& psi,
95  enum PlusMinus isign) const;
96 
97  //! Apply the the odd-even block onto a source std::vector
98  void derivOddEvenLinOp(multi1d<LatticeColorMatrix>& ds_u,
99  const LatticeFermion& chi, const LatticeFermion& psi,
100  enum PlusMinus isign) const;
101 
102  //! Apply the the odd-odd block onto a source std::vector
103  void derivOddOddLinOp(multi1d<LatticeColorMatrix>& ds_u,
104  const LatticeFermion& chi, const LatticeFermion& psi,
105  enum PlusMinus isign) const;
106 
107  //! Return flops performed by the operator()
108  unsigned long nFlops() const;
109 
110  //! Get the log det of the even even part
111  Double logDetEvenEvenLinOp(void) const ;
112 
113  private:
119  CloverTerm invclov; // uggh, only needed for evenEvenLinOp
120  };
121 
122 } // End Namespace Chroma
123 
124 
125 #endif
Even-odd preconditioned linear operator.
Even-odd preconditioned SLRC-Dirac operator.
unsigned long nFlops() const
Return flops performed by the operator()
EvenOddPrecSLRCLinOp()
Partial constructor.
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.
EvenOddPrecSLRCLinOp(Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
Full constructor.
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply even-odd preconditioned Clover fermion linear operator.
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 create(Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
Creation routine.
void oddEvenLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the odd-even block onto a source std::vector.
multi1d< LatticeColorMatrix > Q
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 > > slrc_fs
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.
void derivLogDetEvenEvenLinOp(multi1d< LatticeColorMatrix > &ds_u, enum PlusMinus isign) const
Apply the even-even block onto a source std::vector.
void evenEvenInvLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the inverse of the even-even block onto a source std::vector.
~EvenOddPrecSLRCLinOp()
Destructor is automatic.
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 evenOddLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the the even-odd block onto a source std::vector.
void evenEvenLinOp(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the 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.
multi1d< LatticeColorMatrix > P
Handle< FermState< T, P, Q > > thin_fs
Double logDetEvenEvenLinOp(void) const
Get the log det of the even even part.
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
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
Support class for fermion actions and linear operators.
Stout field state for stout links and a creator.
Params for clover ferm acts.