00001
00002
00003
00004
00005
00006
00007 #ifndef __asqtad_state_h__
00008 #define __asqtad_state_h__
00009
00010
00011 #include "handle.h"
00012 #include "state.h"
00013 #include "actions/ferm/linop/improvement_terms_s.h"
00014
00015
00016 namespace Chroma
00017 {
00018
00019
00020
00021
00022 class AsqtadConnectStateBase : public FermState<LatticeStaggeredFermion,
00023 multi1d<LatticeColorMatrix>,
00024 multi1d<LatticeColorMatrix> >
00025 {
00026 public:
00027
00028 virtual const multi1d<LatticeColorMatrix>& getFatLinks() const = 0;
00029 virtual const multi1d<LatticeColorMatrix>& getTripleLinks() const = 0;
00030
00031
00032 virtual const FermBC<LatticeStaggeredFermion,
00033 multi1d<LatticeColorMatrix>,
00034 multi1d<LatticeColorMatrix> >& getBC() const = 0;
00035
00036
00037 virtual Handle< FermBC<LatticeStaggeredFermion,
00038 multi1d<LatticeColorMatrix>,
00039 multi1d<LatticeColorMatrix> > > getFermBC() const = 0;
00040
00041 };
00042
00043
00044
00045
00046
00047
00048 class AsqtadConnectState : public AsqtadConnectStateBase
00049 {
00050 public:
00051
00052 typedef LatticeStaggeredFermion T;
00053 typedef multi1d<LatticeColorMatrix> P;
00054 typedef multi1d<LatticeColorMatrix> Q;
00055
00056 typedef Real WordBase_t;
00057
00058
00059
00060 AsqtadConnectState(Handle< FermBC<T,P,Q> > fbc_,
00061 const multi1d<LatticeColorMatrix>& u_,
00062 const multi1d<LatticeColorMatrix>& u_fat_,
00063 const multi1d<LatticeColorMatrix>& u_triple_)
00064 : fbc(fbc_), u(u_), u_fat(u_fat_), u_triple(u_triple_) { };
00065
00066 ~AsqtadConnectState() {};
00067
00068
00069 const multi1d<LatticeColorMatrix>& getLinks() const { return u; }
00070 const multi1d<LatticeColorMatrix>& getFatLinks() const { return u_fat; }
00071 const multi1d<LatticeColorMatrix>& getTripleLinks() const { return u_triple; }
00072
00073
00074 const FermBC<T,P,Q>& getBC() const {return *fbc;}
00075
00076
00077 Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
00078
00079 private:
00080 AsqtadConnectState() {}
00081 void operator=(const AsqtadConnectState&) {}
00082
00083 private:
00084 Handle< FermBC<T,P,Q> > fbc;
00085 multi1d<LatticeColorMatrix> u;
00086 multi1d<LatticeColorMatrix> u_fat;
00087 multi1d<LatticeColorMatrix> u_triple;
00088 };
00089
00090
00091 }
00092
00093
00094 #endif