asqtad_linop_s.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: asqtad_linop_s.h,v 3.2 2006/11/17 02:54:47 edwards Exp $
00003 //! Asqtad Staggered-Dirac operator
00004 /*!
00005  * \ingroup linop
00006  *
00007  * This routine is specific to Staggered fermions!
00008  */
00009 
00010 #ifndef __asqtad_linop_s_h__
00011 #define __asqtad_linop_s_h__
00012 
00013 #include "eo_linop.h"
00014 #include "actions/ferm/linop/asqtad_dslash.h"
00015 
00016 
00017 namespace Chroma 
00018 { 
00019   class AsqtadLinOp : public EvenOddLinearOperator< LatticeStaggeredFermion, 
00020                       multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
00021   {
00022   public:
00023     // Typedefs to save typing
00024     typedef LatticeStaggeredFermion      T;
00025     typedef multi1d<LatticeColorMatrix>  P;
00026     typedef multi1d<LatticeColorMatrix>  Q;
00027 
00028     //! Partial constructor - Must use create later
00029     AsqtadLinOp() {}
00030 
00031     //! Full constructor
00032     AsqtadLinOp(Handle<AsqtadConnectStateBase> state_, const Real& Mass_) 
00033     {
00034       create(state_, Mass_);
00035     }
00036 
00037     //! Creation routine
00038     void create(Handle<AsqtadConnectStateBase> state_, const Real& Mass_) 
00039     {
00040       //u_fat = u_fat_;
00041       // u_triple = u_triple_;
00042       Mass = Mass_;
00043       D.create(state_);
00044     };
00045 
00046     //! Destructor is automatic
00047     ~AsqtadLinOp() {}
00048 
00049     //! Return the fermion BC object for this linear operator
00050     //! Return the fermion BC object for this linear operator
00051     const FermBC<T,P,Q>& getFermBC() const {return D.getFermBC();}
00052 
00053     //! Apply the the even-even block onto a source vector
00054     inline void evenEvenLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi, 
00055                               enum PlusMinus isign) const 
00056     {
00057       chi[ rb[0] ] = 2*Mass*psi;
00058     }
00059   
00060     //! Apply the the even-odd block onto a source vector
00061     void evenOddLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi, 
00062                       enum PlusMinus isign) const;
00063 
00064     //! Apply the the odd-even block onto a source vector
00065     void oddEvenLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi, 
00066                       enum PlusMinus isign) const;
00067 
00068     //! Apply the the odd-odd block onto a source vector
00069     inline void oddOddLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi, 
00070                             enum PlusMinus isign) const
00071     {
00072       chi[ rb[1] ] = 2*Mass*psi;
00073     }
00074 
00075     //! Return flops performed by the operator()
00076     unsigned long nFlops() const;
00077 
00078   private:
00079     Real Mass;
00080 
00081     // These are really only needed for D. I bring back D here where
00082     // Steve originally had it.  We don't need u_fat and u_triple here
00083     // they are kept in the action now.
00084     // multi1d<LatticeColorMatrix> u_fat;
00085     // multi1d<LatticeColorMatrix> u_triple;
00086     AsqtadDslash D;
00087   };
00088 
00089 
00090 } // End Namespace Chroma
00091 
00092 
00093 #endif

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