CHROMA
schr_sf_fermbc_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Schroedinger functional base class
3  */
4 
6 
7 namespace Chroma
8 {
9 
10  //! Starting slice in decay direction
12  {
13  int tmin;
14  int j_decay = getDir();
15 
16  switch (getMaxExtent())
17  {
18  case 1:
19  tmin = 0;
20  break;
21 
22  case 2:
23  tmin = 1;
24  break;
25 
26  default:
27  QDPIO::cerr << __func__ << ": unsupport max extent" << std::endl;
28  QDP_abort(1);
29  }
30 
31  return tmin;
32  }
33 
34 
35  //! Ending slice in decay direction
37  {
38  int tmax;
39  int j_decay = getDir();
40 
41  switch (getMaxExtent())
42  {
43  case 1:
44  tmax = QDP::Layout::lattSize()[j_decay] - 2;
45  break;
46 
47  case 2:
48  tmax = QDP::Layout::lattSize()[j_decay] - 3;
49  break;
50 
51  default:
52  QDPIO::cerr << __func__ << ": unsupport max extent" << std::endl;
53  QDP_abort(1);
54  }
55 
56  return tmax;
57  }
58 
59 
60  //! Construct the mask and boundary fields
61  void SchrSFFermBC::initBnd(multi1d<LatticeColorMatrix>& SFBndFld,
62  multi1d<LatticeBoolean>& lSFmask,
63  LatticeBoolean& lSFmaskF,
64  const multi1d<LatticeColorMatrix>& SFBndFldG,
65  const multi1d<LatticeBoolean>& lSFmaskG) const
66  {
67  START_CODE();
68 
69  SFBndFld.resize(Nd);
70  lSFmask.resize(Nd);
71 
72  int j_decay = getDir();
73 
74  // Set the fermion mask to one of the non-decay gauge masks
75  for(int mu = 0; mu < Nd; ++mu)
76  {
77  if (mu == j_decay) continue;
78 
79  lSFmaskF = lSFmaskG[mu];
80  break;
81  }
82 
83  /* Set the fermion phases */
84  /* Multiply the phase factors. It is all done here */
85  /* SFBndFldF[mu] *= exp(i*2*pi*theta(mu)/L(mu)) */
86  for(int mu = 0, i = 0; mu < Nd; ++mu)
87  {
88  SFBndFld[mu] = SFBndFldG[mu];
89  lSFmask[mu] = lSFmaskG[mu];
90 
91  if (mu != j_decay)
92  {
93  Real ftmp = Chroma::twopi * getTheta()[i] / Real(QDP::Layout::lattSize()[mu]);
94  SFBndFld[mu] *= cmplx(cos(ftmp),sin(ftmp));
95  ++i;
96  }
97  }
98 
99  END_CODE();
100  }
101 
102 }
virtual const multi1d< LatticeBoolean > & lSFmask() const =0
Mask which lattice sites have fixed gauge links.
virtual const multi1d< LatticeColorMatrix > & SFBndFld() const =0
Fixed gauge links on only the lSFmask() sites.
virtual const LatticeBoolean & lSFmaskF() const =0
Mask which lattice sites have fixed fermion fields.
virtual int getDir() const =0
Decay direction.
virtual int getMaxExtent() const =0
Maximum plaquette size. This is what knows about 1x1 plaq or 1x2 rect.
virtual int getDecayMax() const
Ending slice in decay direction.
virtual const multi1d< Real > & getTheta() const =0
Get the angles on the boundaries.
virtual int getDecayMin() const
Starting slice in decay direction.
virtual void initBnd(multi1d< LatticeColorMatrix > &SFBndFld, multi1d< LatticeBoolean > &lSFmask, LatticeBoolean &lSFmaskF, const multi1d< LatticeColorMatrix > &SFBndFldG, const multi1d< LatticeBoolean > &lSFmaskG) const
Construct the mask and boundary fields.
int mu
Definition: cool.cc:24
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55
const Real twopi
Definition: chromabase.h:55
START_CODE()
Schroedinger ferm boundary conditions.