CHROMA
stout_utils.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Stout utilities
4  */
5 
6 #ifndef STOUT_UTILS_H
7 #define STOUT_UTILS_H
8 
9 #include "chromabase.h"
10 
11 #if 0
12 #ifdef QDP_IS_QDPJIT
13 #ifdef QDPJIT_IS_QDPJITPTX
14 CUfunction function_get_fs_bs_build(const LatticeColorMatrix& Q,
15  const LatticeColorMatrix& QQ,
16  multi1d<LatticeComplex>& f,
17  multi1d<LatticeComplex>& b1,
18  multi1d<LatticeComplex>& b2,
19  bool dobs);
20 CUfunction function_get_fs_bs_exec(CUfunction function,
21  const LatticeColorMatrix& Q,
22  const LatticeColorMatrix& QQ,
23  multi1d<LatticeComplex>& f,
24  multi1d<LatticeComplex>& b1,
25  multi1d<LatticeComplex>& b2,
26  bool dobs);
27 #endif
28 #endif
29 #endif
30 
31 namespace Chroma
32 {
33 
34  /*!
35  * Stouting
36  *
37  * \ingroup gauge
38  *
39  * @{
40  */
41 
42  /*! \ingroup gauge */
43  namespace StoutLinkTimings {
44  double getForceTime();
45  double getSmearingTime();
46  double getFunctionsTime();
47  }
48 
49  /*! \ingroup gauge */
50  namespace Stouting
51  {
52  //! Given field U, form Q and Q^2
53  void getQs(const multi1d<LatticeColorMatrix>& u,
54  LatticeColorMatrix& Q,
55  LatticeColorMatrix& QQ,
56  int mu,
57  const multi1d<bool>& smear_in_this_dirP,
58  const multi2d<Real>& rho);
59 
60  //! Given field U, construct the staples into C, form Q and Q^2 and compute c0 and c1
61  void getQsandCs(const multi1d<LatticeColorMatrix>& u,
62  LatticeColorMatrix& Q,
63  LatticeColorMatrix& QQ,
64  LatticeColorMatrix& C,
65  int mu,
66  const multi1d<bool>& smear_in_this_dirP,
67  const multi2d<Real>& rho);
68 
69  //! Given c0 and c1 compute the f-s and b-s
70  /*! \ingroup gauge */
71  void getFs(const LatticeColorMatrix& Q,
72  const LatticeColorMatrix& QQ,
73  multi1d<LatticeComplex>& f);
74 
75  //! Given c0 and c1 compute the f-s and b-s
76  /*! Only compute b-s if do_bs is set to true (default) */
77  void getFsAndBs(const LatticeColorMatrix& Q,
78  const LatticeColorMatrix& QQ,
79  multi1d<LatticeComplex>& f,
80  multi1d<LatticeComplex>& b1,
81  multi1d<LatticeComplex>& b2,
82  bool do_bs=true);
83 
84  //! Stout smear in a specific link direction
85  void stout_smear(LatticeColorMatrix& next,
86  const multi1d<LatticeColorMatrix>& current,
87  int mu,
88  const multi1d<bool>& smear_in_this_dirP,
89  const multi2d<Real>& rho);
90 
91  //! Do the smearing from level i to level i+1
92  void smear_links(const multi1d<LatticeColorMatrix>& current,
93  multi1d<LatticeColorMatrix>& next,
94  const multi1d<bool>& smear_in_this_dirP,
95  const multi2d<Real>& rho);
96 
97  //! Do the force recursion from level i+1, to level i
98  void deriv_recurse(multi1d<LatticeColorMatrix>& F,
99  const multi1d<bool>& smear_in_this_dirP,
100  const multi2d<Real>& rho,
101  const multi1d<LatticeColorMatrix>& u);
102 
103  }
104 
105  /*! @} */ // end of group gauge
106 }
107 
108 #endif
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
void getFs(const LatticeColorMatrix &Q, const LatticeColorMatrix &QQ, multi1d< LatticeComplex > &f)
Given c0 and c1 compute the f-s and b-s.
Definition: stout_utils.cc:383
void smear_links(const multi1d< LatticeColorMatrix > &current, multi1d< LatticeColorMatrix > &next, const multi1d< bool > &smear_in_this_dirP, const multi2d< Real > &rho)
Do the smearing from level i to level i+1.
Definition: stout_utils.cc:936
void getQs(const multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &Q, LatticeColorMatrix &QQ, int mu, const multi1d< bool > &smear_in_this_dirP, const multi2d< Real > &rho)
Given field U, form Q and Q^2.
Definition: stout_utils.cc:89
void deriv_recurse(multi1d< LatticeColorMatrix > &F, const multi1d< bool > &smear_in_this_dirP, const multi2d< Real > &rho, const multi1d< LatticeColorMatrix > &u)
Do the force recursion from level i+1, to level i.
Definition: stout_utils.cc:186
void getFsAndBs(const LatticeColorMatrix &Q, const LatticeColorMatrix &QQ, multi1d< LatticeComplex > &f, multi1d< LatticeComplex > &b1, multi1d< LatticeComplex > &b2, bool dobs)
Given c0 and c1 compute the f-s and b-s.
Definition: stout_utils.cc:874
void getQsandCs(const multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &Q, LatticeColorMatrix &QQ, LatticeColorMatrix &C, int mu, const multi1d< bool > &smear_in_this_dirP, const multi2d< Real > &rho)
Given field U, construct the staples into C, form Q and Q^2 and compute c0 and c1.
Definition: stout_utils.cc:105
void stout_smear(LatticeColorMatrix &next, const multi1d< LatticeColorMatrix > &current, int mu, const multi1d< bool > &smear_in_this_dirP, const multi2d< Real > &rho)
Stout smear in a specific link direction.
Definition: stout_utils.cc:970
SpinMatrix C()
C = Gamma(10)
Definition: barspinmat_w.cc:29
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
multi1d< LatticeColorMatrix > Q
Definition: t_clover.cc:12
static INTERNAL_PRECISION F