CHROMA
disp_colvec_map.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Holds displaced color vectors
4  */
5 
6 #ifndef __disp_colvec_map_h__
7 #define __disp_colvec_map_h__
8 
9 #include "chromabase.h"
11 #include "qdp_map_obj.h"
12 #include <map>
13 
14 namespace Chroma
15 {
16  /*!
17  * \ingroup smear
18  *
19  * @{
20  */
21  //----------------------------------------------------------------------------
22  //! The key for displaced color vectors
24  {
25  int colvec; /*!< Colorstd::vector index */
26  multi1d<int> displacement; /*!< Orig plus/minus 1-based directional displacements */
27  };
28 
29 
30  //! Support for the keys of smeared and displaced color vectors
32 
33 
34  //! The value of the std::map
36  {
37  LatticeColorVector vec;
38  };
39 
40 
41  //----------------------------------------------------------------------------
42  //! The displaced objects
44  {
45  public:
46  //! Constructor for displaced std::map
48  int disp_length,
49  const multi1d<LatticeColorMatrix>& u_smr,
50  const QDP::MapObject<int,EVPair<LatticeColorVector> >& eigen_source);
51 
52  //! Destructor
54 
55  //! Accessor
56  const LatticeColorVector getDispVector(const KeyDispColorVector_t& key);
57 
58  protected:
59  //! Displace an object
60  const LatticeColorVector& displaceObject(const KeyDispColorVector_t& key);
61 
62  private:
63  //! Lattice color vectors
64  const QDP::MapObject<int,EVPair<LatticeColorVector> >& eigen_source;
65 
66  //! Gauge field
67  const multi1d<LatticeColorMatrix>& u;
68 
69  //! Displacements or derivatives?
71 
72  //! Displacement length
74 
75  //! Maps of displaced color vectors
76  std::map<KeyDispColorVector_t, ValDispColorVector_t> disp_src_map;
77  };
78 
79  /*! @} */ // end of group smear
80 
81 } // namespace Chroma
82 
83 #endif
Primary include file for CHROMA library code.
The displaced objects.
std::map< KeyDispColorVector_t, ValDispColorVector_t > disp_src_map
Maps of displaced color vectors.
const QDP::MapObject< int, EVPair< LatticeColorVector > > & eigen_source
Lattice color vectors.
DispColorVectorMap(bool use_derivP, int disp_length, const multi1d< LatticeColorMatrix > &u_smr, const QDP::MapObject< int, EVPair< LatticeColorVector > > &eigen_source)
Constructor for displaced std::map.
const multi1d< LatticeColorMatrix > & u
Gauge field.
int use_derivP
Displacements or derivatives?
const LatticeColorVector getDispVector(const KeyDispColorVector_t &key)
Accessor.
int displacement_length
Displacement length.
const LatticeColorVector & displaceObject(const KeyDispColorVector_t &key)
Displace an object.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
bool operator<(const KeyDispColorVector_t &a, const KeyDispColorVector_t &b)
Support for the keys of smeared and displaced color vectors.
Complex a
Definition: invbicg.cc:95
Complex b
Definition: invbicg.cc:96
A Pair type.
The key for displaced color vectors.
The value of the std::map.
Holds of vectors and eigenvalues.