CHROMA
fixed_random_ferm_monomial.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Fixed random monomial
5  */
6 
7 #ifndef FIXED_RANDOM_FERM_MONOMIAL_H
8 #define FIXED_RANDOM_FERM_MONOMIAL_H
9 
10 
11 #include "abs_monomial.h"
12 #include "chromabase.h"
13 #include "util/gauge/reunit.h"
14 #include "io/param_io.h"
16 #include "util/gauge/taproj.h"
17 
18 using namespace QDP;
19 
20 namespace Chroma {
21 
22  /*! @ingroup monomial */
23  namespace FixedRandomFermMonomial4DEnv
24  {
25  bool registerAll();
26  }
27 
28  /*! @ingroup monomial */
30  {
32 
33  FixedRandomFermMonomialParams(XMLReader& in, const std::string& path) {
34  XMLReader paramtop(in, path);
35  fermstate = readXMLGroup(paramtop, "FermState", "Name");
36  }
37 
39  };
40 
41 
42  //! Test monomial
43  /*! @ingroup monomial */
44  class FixedRandomFermMonomial4D : public ExactFermMonomial<multi1d<LatticeColorMatrix>,multi1d<LatticeColorMatrix>,LatticeFermion>
45  {
46  public:
47  typedef multi1d<LatticeColorMatrix> P;
48  typedef multi1d<LatticeColorMatrix> Q;
49  typedef LatticeFermion Phi;
50 
51  ~FixedRandomFermMonomial4D() {} // Destructor is automatic
52 
55  X.resize(Nd);
56  X = m.X;
57  }
58 
59  void dsdq(P& F, const AbsFieldState<P,Q>& s);
60 
61  Double S(const AbsFieldState<P,Q>& s);
62 
63  //! Refresh pseudofermions
64  void refreshInternalFields(const AbsFieldState<P,Q>& field_state) {
65  // No Internal fields
66  }
67 
68  //! Copy pseudofermions if any
69  virtual void setInternalFields(const Monomial<P,Q>& m) {
70  // No Internal Fields
71  }
72 
73  private:
74  multi1d<LatticeColorMatrix> X;
75  Handle< CreateStoutFermState<LatticeFermion,
76  multi1d<LatticeColorMatrix>,
77  multi1d<LatticeColorMatrix> > > cfs;
78 
79  };
80 
81 }
82 
83 #endif
84 
Monomials - gauge action or fermion binlinear contributions for HMC.
Primary include file for CHROMA library code.
Abstract field state.
Definition: field_state.h:27
Create a stout ferm connection state.
Fermionic monomials (binlinears in fermion fields)
Definition: abs_monomial.h:145
FixedRandomFermMonomial4D(const FixedRandomFermMonomial4D &m)
void refreshInternalFields(const AbsFieldState< P, Q > &field_state)
Refresh pseudofermions.
Handle< CreateStoutFermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > cfs
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
Class for counted reference semantics.
Definition: handle.h:33
An abstract monomial class, for inexact algorithms.
Definition: abs_monomial.h:43
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
unsigned s
Definition: ldumul_w.cc:37
static int m[4]
Definition: make_seeds.cc:16
Nd
Definition: meslate.cc:74
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static QDP_ColorVector * in
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979
Various parameter structs and reader/writers.
Reunitarize in place a color matrix to SU(N)
Stout field state for stout links and a creator.
FixedRandomFermMonomialParams(XMLReader &in, const std::string &path)
Hold group xml and type id.
multi1d< LatticeColorMatrix > P
Definition: t_clover.cc:13
Take the traceless antihermitian projection of a color matrix.
static INTERNAL_PRECISION F