00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __periodic_fermstate_h__
00009 #define __periodic_fermstate_h__
00010
00011 #include "state.h"
00012 #include "create_state.h"
00013 #include "handle.h"
00014 #include "actions/ferm/fermbcs/periodic_fermbc.h"
00015
00016 namespace Chroma
00017 {
00018
00019
00020
00021
00022
00023 template<typename T, typename P, typename Q>
00024 class PeriodicFermState : public FermState<T,P,Q>
00025 {
00026 public:
00027
00028 PeriodicFermState(const Q& q_) :
00029 fbc(new PeriodicFermBC<T,P,Q>()), q(q_) {}
00030
00031
00032 ~PeriodicFermState() {}
00033
00034
00035 const Q& getLinks() const {return q;}
00036
00037
00038 const FermBC<T,P,Q>& getBC() const {return *fbc;}
00039
00040
00041 Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
00042
00043 private:
00044 PeriodicFermState() {}
00045 void operator=(const PeriodicFermState&) {}
00046
00047 private:
00048 Handle< FermBC<T,P,Q> > fbc;
00049 Q q;
00050 };
00051
00052
00053
00054
00055
00056
00057
00058
00059 template<typename T, typename P, typename Q>
00060 class CreatePeriodicFermState : public CreateFermState<T,P,Q>
00061 {
00062 public:
00063
00064 CreatePeriodicFermState() : fbc(new PeriodicFermBC<T,P,Q>()) {}
00065
00066
00067 ~CreatePeriodicFermState() {}
00068
00069
00070 PeriodicFermState<T,P,Q>* operator()(const Q& q) const
00071 {
00072 return new PeriodicFermState<T,P,Q>(q);
00073 }
00074
00075
00076 const FermBC<T,P,Q>& getBC() const {return *fbc;}
00077
00078
00079 Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
00080
00081 private:
00082 void operator=(const CreatePeriodicFermState&) {}
00083
00084 private:
00085 Handle< FermBC<T,P,Q> > fbc;
00086 };
00087
00088 }
00089
00090
00091 #endif