eoprec_nef_fermact_array_w.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: eoprec_nef_fermact_array_w.h,v 3.1 2006/10/19 16:01:27 edwards Exp $
00003 /*! \file
00004  *  \brief 4D style even-odd preconditioned NEF fermion action
00005  */
00006 
00007 #ifndef __prec_nef_fermact_array_w_h__
00008 #define __prec_nef_fermact_array_w_h__
00009 
00010 #include "actions/ferm/fermacts/eoprec_dwf_fermact_base_array_w.h"
00011 
00012 
00013 namespace Chroma
00014 {
00015   //! Name and registration
00016   namespace EvenOddPrecNEFFermActArrayEnv
00017   {
00018     extern const std::string name;
00019     bool registerAll();
00020   }
00021   
00022 
00023   //! Params for NEFF
00024   struct EvenOddPrecNEFFermActArrayParams
00025   {
00026     EvenOddPrecNEFFermActArrayParams() {}
00027     EvenOddPrecNEFFermActArrayParams(XMLReader& in, const std::string& path);
00028     
00029     Real OverMass;
00030     Real b5;
00031     Real c5;
00032     Real Mass;
00033     int  N5;
00034   };
00035 
00036 
00037   // Reader/writers
00038   void read(XMLReader& xml, const string& path, EvenOddPrecNEFFermActArrayParams& param);
00039   void write(XMLWriter& xml, const string& path, const EvenOddPrecNEFFermActArrayParams& param);
00040 
00041 
00042   //! 4D style even-odd preconditioned domain-wall fermion action
00043   /*! \ingroup fermacts
00044    *
00045    * 4D style even-odd preconditioned domain-wall fermion action. 
00046    * Follows notes of Orginos (10/2003)
00047    *
00048    * Hopefully, the conventions used here
00049    * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
00050    */
00051   class EvenOddPrecNEFFermActArray : public EvenOddPrecDWFermActBaseArray<LatticeFermion, 
00052                                    multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
00053   {
00054   public:
00055     // Typedefs to save typing
00056     typedef LatticeFermion               T;
00057     typedef multi1d<LatticeColorMatrix>  P;
00058     typedef multi1d<LatticeColorMatrix>  Q;
00059 
00060     //! General constructor
00061     EvenOddPrecNEFFermActArray(Handle< CreateFermState<T,P,Q> > cfs_, 
00062                                const EvenOddPrecNEFFermActArrayParams& p) : 
00063       cfs(cfs_), params(p)
00064       {
00065         QDPIO::cout << "Construct EvenOddPrecNEFFermActArray: OverMass = " << params.OverMass 
00066                     << "  Mass = " << params.Mass 
00067                     << "  N5 = " << params.N5 
00068                     << "  b5 = " << params.b5
00069                     << "  c5 = " << params.c5
00070                     << endl;
00071       }
00072 
00073     //! Copy constructor
00074     EvenOddPrecNEFFermActArray(const EvenOddPrecNEFFermActArray& a) : 
00075       cfs(a.cfs), params(a.params) {}
00076 
00077     //! Length of DW flavor index/space
00078     int size() const {return params.N5;}
00079 
00080     //! Return the quark mass
00081     Real getQuarkMass() const {return params.Mass;}
00082 
00083     //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
00084     UnprecDWLikeLinOpBaseArray<T,P,Q>* unprecLinOp(Handle< FermState<T,P,Q> > state, 
00085                                                    const Real& m_q) const;
00086 
00087     //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
00088     EvenOddPrecDWLikeLinOpBaseArray<T,P,Q>* precLinOp(Handle< FermState<T,P,Q> > state, 
00089                                                       const Real& m_q) const;
00090 
00091     //! Destructor is automatic
00092     ~EvenOddPrecNEFFermActArray() {}
00093 
00094     //! Given a complete propagator as a source, this does all the inversions needed
00095     /*!
00096      * This routine is actually generic to Domain Wall fermions (Array) fermions
00097      *
00098      * \param q_sol         quark propagator ( Write )
00099      * \param q_src         source ( Read )
00100      * \param xml_out       diagnostic output ( Modify )
00101      * \param state         gauge connection state ( Read )
00102      * \param t_src         time slice of source ( Read )
00103      * \param j_decay       direction of decay ( Read )
00104      * \param invParam      inverter parameters ( Read )
00105      * \param obsvP         compute currents and residual mass ( Read )
00106      * \param ncg_had       number of CG iterations ( Write )
00107      */
00108     void quarkProp(LatticePropagator& q_sol,   // Oops, need to make propagator type more general
00109                    XMLWriter& xml_out,
00110                    const LatticePropagator& q_src,
00111                    int t_src, int j_decay,
00112                    Handle< FermState<T,P,Q> > state,
00113                    const GroupXML_t& invParam,
00114                    QuarkSpinType quarkSpinType,
00115                    bool obsvP,
00116                    int& ncg_had) const;
00117 
00118   protected:
00119     //! Return the fermion BC object for this action
00120     const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
00121 
00122     //! Partial constructor
00123     EvenOddPrecNEFFermActArray() {}
00124     //! Hide =
00125     void operator=(const EvenOddPrecNEFFermActArray& a) {}
00126 
00127   private:
00128     Handle< CreateFermState<T,P,Q> >  cfs;
00129     EvenOddPrecNEFFermActArrayParams params;
00130   };
00131 
00132 }
00133 
00134 #endif

Generated on Sat Mar 13 04:29:23 2010 for CHROMA by  doxygen 1.4.7