CHROMA
periodic_fermstate.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Periodic ferm state and a creator
5  */
6 
7 #ifndef __periodic_fermstate_h__
8 #define __periodic_fermstate_h__
9 
10 #include "state.h"
11 #include "create_state.h"
12 #include "handle.h"
14 
15 namespace Chroma
16 {
17  //! Periodic version of FermState
18  /*! @ingroup fermstates
19  *
20  * Only needs to hold a ferm field and ferm bc
21  */
22  template<typename T, typename P, typename Q>
23  class PeriodicFermState : public FermState<T,P,Q>
24  {
25  public:
26  //! Full constructor
27  PeriodicFermState(const Q& q_) :
28  fbc(new PeriodicFermBC<T,P,Q>()), q(q_) {}
29 
30  //! Destructor
32 
33  //! Return the link fields needed in constructing linear operators
34  const Q& getLinks() const {return q;}
35 
36  //! Return the ferm BC object for this state
37  const FermBC<T,P,Q>& getBC() const {return *fbc;}
38 
39  //! Return the ferm BC object for this state
40  Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
41 
42  private:
43  PeriodicFermState() {} // hide default constructur
44  void operator=(const PeriodicFermState&) {} // hide =
45 
46  private:
48  Q q;
49  };
50 
51 
52 
53  //! Create a simple ferm connection state
54  /*! @ingroup fermstates
55  *
56  * This is a factory class for producing a connection state
57  */
58  template<typename T, typename P, typename Q>
60  {
61  public:
62  //! Full constructor
64 
65  //! Destructor
67 
68  //! Construct a ConnectState
70  {
71  return new PeriodicFermState<T,P,Q>(q);
72  }
73 
74  //! Return the ferm BC object for this state
75  const FermBC<T,P,Q>& getBC() const {return *fbc;}
76 
77  //! Return the ferm BC object for this state
78  Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
79 
80  private:
81  void operator=(const CreatePeriodicFermState&) {} // hide =
82 
83  private:
85  };
86 
87 }
88 
89 
90 #endif
Create a fermion connection state.
Definition: create_state.h:69
Create a simple ferm connection state.
void operator=(const CreatePeriodicFermState &)
Handle< FermBC< T, P, Q > > getFermBC() const
Return the ferm BC object for this state.
CreatePeriodicFermState()
Full constructor.
const FermBC< T, P, Q > & getBC() const
Return the ferm BC object for this state.
Handle< FermBC< T, P, Q > > fbc
PeriodicFermState< T, P, Q > * operator()(const Q &q) const
Construct a ConnectState.
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Concrete class for all fermionic actions with trivial boundary conditions.
Periodic version of FermState.
void operator=(const PeriodicFermState &)
Handle< FermBC< T, P, Q > > fbc
PeriodicFermState(const Q &q_)
Full constructor.
const FermBC< T, P, Q > & getBC() const
Return the ferm BC object for this state.
Handle< FermBC< T, P, Q > > getFermBC() const
Return the ferm BC object for this state.
const Q & getLinks() const
Return the link fields needed in constructing linear operators.
Create a connection state.
Class for counted reference semantics.
Double q
Definition: mesq.cc:17
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
Fermion action boundary conditions.
Support class for fermion actions and linear operators.
multi1d< LatticeColorMatrix > P
Definition: t_clover.cc:13