CHROMA
inline_laplace_eigs.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Use the Implicitly Restarted Lanczos method with a Tchebyshev
4  * polynomial preconditioner to solve for the lowest eigenvalues and
5  * eigenvectors of the gague-covariant Laplacian
6  */
7 
8 #ifndef __inline_laplace_eigs_h__
9 #define __inline_laplace_eigs_h__
10 
11 #include "chromabase.h"
13 #include "io/xml_group_reader.h"
14 
15 namespace Chroma
16 {
17  /*! \ingroup inlinehadron */
18  namespace InlineLaplaceEigsEnv
19  {
20  bool registerAll();
21 
22  //! Parameter structure
23  /*! \ingroup inlinehadron */
24  struct Params
25  {
26  Params();
27  Params(XMLReader& xml_in, const std::string& path);
28 
29  unsigned long frequency;
30 
31  struct Param_t
32  {
33  int num_vecs; /*!< Number of vectors */
34  int decay_dir; /*!< Decay direction */
35  int max_iter; /*!< Maximum number of Lanczos iterations */
36  Real tol; /*!< Allowed residual upon exit */
37 
38  GroupXML_t link_smear; /*!< link smearing xml */
39  };
40 
42  {
43  std::string gauge_id; /*!< Gauge field */
44  std::string colorvec_id; /*!< Id for color vectors */
45  GroupXML_t colorvec_obj; /*!< Output colorvecs */
46  };
47 
48  Param_t param; /*!< Parameters */
49  NamedObject_t named_obj; /*!< Named objects */
50  std::string xml_file; /*!< Alternate XML file pattern */
51  };
52 
53 
54  //! Inline task for Laplcian eigenvectors
55  /*! \ingroup inlinehadron */
57  {
58  public:
60  InlineMeas(const Params& p) : params(p) {}
62 
63  unsigned long getFrequency(void) const {return params.frequency;}
64 
65  //! Do the measurement
66  void operator()(const unsigned long update_no,
67  XMLWriter& xml_out);
68 
69  protected:
70  //! Do the measurement
71  void func(const unsigned long update_no,
72  XMLWriter& xml_out);
73 
74  private:
76  };
77 
78  } // namespace LaplaceEigsEnv
79 
80 }
81 
82 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline task for Laplcian eigenvectors.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
Read an XML group as a std::string.