00001
00002
00003
00004
00005
00006
00007
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
00024 typedef LatticeStaggeredFermion T;
00025 typedef multi1d<LatticeColorMatrix> P;
00026 typedef multi1d<LatticeColorMatrix> Q;
00027
00028
00029 AsqtadLinOp() {}
00030
00031
00032 AsqtadLinOp(Handle<AsqtadConnectStateBase> state_, const Real& Mass_)
00033 {
00034 create(state_, Mass_);
00035 }
00036
00037
00038 void create(Handle<AsqtadConnectStateBase> state_, const Real& Mass_)
00039 {
00040
00041
00042 Mass = Mass_;
00043 D.create(state_);
00044 };
00045
00046
00047 ~AsqtadLinOp() {}
00048
00049
00050
00051 const FermBC<T,P,Q>& getFermBC() const {return D.getFermBC();}
00052
00053
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
00061 void evenOddLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
00062 enum PlusMinus isign) const;
00063
00064
00065 void oddEvenLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
00066 enum PlusMinus isign) const;
00067
00068
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
00076 unsigned long nFlops() const;
00077
00078 private:
00079 Real Mass;
00080
00081
00082
00083
00084
00085
00086 AsqtadDslash D;
00087 };
00088
00089
00090 }
00091
00092
00093 #endif