CHROMA
inline_ritz_H_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline construction of eigenvalues (Ritz)
4  *
5  * Eigenvalue calculations
6  */
7 
8 #ifndef __inline_ritz_H_w_h__
9 #define __inline_ritz_H_w_h__
10 
11 #include "chromabase.h"
13 #include "io/eigen_io.h"
14 
15 namespace Chroma
16 {
17  /*! \ingroup inlinehadron */
18  namespace InlineRitzEnv
19  {
20  extern const std::string name;
21  bool registerAll();
22 
23 
24  //! Parameter structure
25  /*! \ingroup inlinehadron */
26  struct Params
27  {
28  Params();
29  Params(XMLReader& xml_in, const std::string& path);
30  void writeXML(XMLWriter& xml_out, const std::string& path);
31 
32  unsigned long frequency;
33 
34  struct Param_t
35  {
36  int version;
37  GroupXML_t fermact; /*!< fermion action */
39  } param;
41 
43  {
47 
48  std::string xml_file; // Alternate XML file pattern
49  };
50 
51  //! Inline measurement of eigenvalues
52  /*! \ingroup inlinehadron */
54  {
55  public:
57  InlineMeas(const Params& p) : params(p) {}
59 
60  unsigned long getFrequency(void) const {return params.frequency;}
61 
62  //! Do the measurement
63  void operator()(const unsigned long update_no,
64  XMLWriter& xml_out);
65 
66  protected:
67  //! Do the measurement
68  void func(const unsigned long update_no,
69  XMLWriter& xml_out);
70 
71  private:
73  };
74 
75  } // namespace InlineRitzEnv
76 
77 } // namespace Chroma
78 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline measurement of eigenvalues.
void func(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.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Eigenvalue IO.
bool registerAll()
Register all the factories.
const std::string name
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
struct Chroma::InlineRitzEnv::Params::Param_t param
void writeXML(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineRitzEnv::Params::NamedObject_t named_obj
Struct for parameters needed for a Ritz KS type solve.
Definition: eigen_io.h:22