asqtad_fermact_s.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: asqtad_fermact_s.h,v 3.4 2006/11/17 02:17:31 edwards Exp $
00003 /*! \file
00004  *  \brief Asqtad staggered fermion action
00005  */
00006 
00007 #ifndef __asqtad_fermact_s_h__
00008 #define __asqtad_fermact_s_h__
00009 
00010 #include "stagtype_fermact_s.h"
00011 #include "state.h"
00012 #include "actions/ferm/fermstates/asqtad_state.h"
00013 #include "actions/ferm/fermstates/simple_fermstate.h"
00014 #include "actions/ferm/fermacts/asqtad_fermact_params_s.h"
00015 
00016 
00017 namespace Chroma 
00018 { 
00019   //! Name and registration
00020   namespace AsqtadFermActEnv
00021   {
00022     extern const std::string name;
00023     bool registerAll();
00024   }
00025 
00026 
00027   //! Asqtad staggered fermion action
00028   /*! \ingroup fermacts
00029    *
00030    */
00031   class AsqtadFermAct : public EvenOddStaggeredTypeFermAct<
00032     LatticeStaggeredFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
00033   {
00034   public:
00035     // Typedefs to save typing
00036     typedef LatticeStaggeredFermion      T;
00037     typedef multi1d<LatticeColorMatrix>  P;
00038     typedef multi1d<LatticeColorMatrix>  Q;
00039 
00040     //! General CreateFermState
00041     AsqtadFermAct(Handle< CreateFermState<T,P,Q> > cfs_, 
00042                   const AsqtadFermActParams& p) :
00043       cfs(cfs_), param(p) {}
00044   
00045     //! Copy constructor
00046     AsqtadFermAct(const AsqtadFermAct& a) : 
00047       cfs(a.cfs), param(a.param) {}
00048 
00049     //! Create state should apply the BC
00050     AsqtadConnectStateBase* createState(const Q& u_) const;
00051 
00052     //! Return the fermion BC object for this action
00053     const FermBC<T,P,Q>& getFermBC() const {return cfs->getBC();}
00054 
00055     //! Produce a linear operator for this action
00056     EvenOddLinearOperator<T,P,Q>* linOp(Handle< FermState<T,P,Q> > state_) const;
00057 
00058     //! Produce a linear operator M^dag.M for this action
00059     DiffLinearOperator<T,P,Q>* lMdagM(Handle< FermState<T,P,Q> > state_) const;
00060 
00061     //! Return quark prop solver, solution of unpreconditioned system
00062     SystemSolver<T>* qprop(Handle< FermState<T,P,Q> > state,
00063                            const GroupXML_t& invParam) const;
00064 
00065     //! accessors 
00066     const Real getQuarkMass() const {return param.Mass;}
00067     Real getU0() {return param.u0;}
00068 
00069     //! Destructor is automatic
00070     ~AsqtadFermAct() {}
00071 
00072   protected:
00073     //! Return the fermion BC object for this action
00074     const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
00075 
00076   private:
00077     AsqtadFermAct() {} //hide default constructor
00078     void operator=(const AsqtadFermAct& a) {} // Assignment
00079   
00080   private:
00081     Handle< CreateFermState<T,P,Q> >  cfs;
00082     AsqtadFermActParams  param;
00083   };
00084 
00085 
00086 }; // End Namespace Chroma
00087 
00088 #endif

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