asqtad_state.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: asqtad_state.h,v 1.1 2006/09/19 17:53:36 edwards Exp $
00003 /*! \file
00004  *  \brief Asqtad state
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   //! Basic "Connect State" for ASQTAD
00019   /*! 
00020    * \ingroup fermstates
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     //! Return the gauge BC object for this state
00032     virtual const FermBC<LatticeStaggeredFermion, 
00033                          multi1d<LatticeColorMatrix>, 
00034                          multi1d<LatticeColorMatrix> >& getBC() const = 0;
00035 
00036     //! Return the ferm BC object for this state
00037     virtual Handle< FermBC<LatticeStaggeredFermion, 
00038                            multi1d<LatticeColorMatrix>, 
00039                            multi1d<LatticeColorMatrix> > > getFermBC() const = 0;
00040 
00041   };
00042 
00043 
00044   //! The actual Asqtad thing
00045   /*! 
00046    * \ingroup fermstates
00047    */
00048   class AsqtadConnectState : public AsqtadConnectStateBase
00049   {
00050   public:
00051     // Typedefs to save typing
00052     typedef LatticeStaggeredFermion      T;
00053     typedef multi1d<LatticeColorMatrix>  P;
00054     typedef multi1d<LatticeColorMatrix>  Q;
00055 
00056     typedef Real WordBase_t;
00057   
00058     //! Full Constructor
00059     // Make deep copies here
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     //! Return the link fields needed in constructing linear operators
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     //! Return the gauge BC object for this state
00074     const FermBC<T,P,Q>& getBC() const {return *fbc;}
00075    
00076     //! Return the ferm BC object for this state
00077     Handle< FermBC<T,P,Q> > getFermBC() const {return fbc;}
00078 
00079   private:
00080     AsqtadConnectState() {}  // hide default constructur
00081     void operator=(const AsqtadConnectState&) {} // hide =
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 } // End Namespace Chroma
00092 
00093 
00094 #endif

Generated on Sun Nov 22 04:28:49 2009 for CHROMA by  doxygen 1.4.7