CHROMA
dwffld_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief DWF parity/rotation operator
3  *
4  * Apply a DWF style `parity' or rotation operator to move from
5  * boundary field basis to single field basis or back again
6  */
7 
8 #include "chromabase.h"
10 
11 
12 namespace Chroma
13 {
14  //! DWF parity/rotation operator
15  /*! \ingroup linop
16  *
17  * Chi := P^{isign} . Psi where P is the rotation operator
18  *
19  * \param psi Pseudofermion field (Read)
20  * \param chi Pseudofermion field (Write)
21  * \param isign Sign (Plus/Minus) (Read)
22  */
23 
24  void DwfFld(multi1d<LatticeFermion>& chi, const multi1d<LatticeFermion>& psi, enum PlusMinus isign)
25  {
26  START_CODE();
27 
28  const int N5 = psi.size();
29  chi.resize(N5);
30 
31  switch (isign)
32  {
33  case PLUS:
34  for(int n=0; n < N5-1; ++n)
35  chi[n] = chiralProjectMinus(psi[n]) + chiralProjectPlus(psi[n+1]);
36 
37  chi[N5-1] = chiralProjectMinus(psi[N5-1]) + chiralProjectPlus(psi[0]);
38  break;
39 
40  case MINUS:
41  chi[0] = chiralProjectMinus(psi[0]) + chiralProjectPlus(psi[N5-1]);
42  for(int n=1; n < N5; ++n)
43  chi[n] = chiralProjectMinus(psi[n]) + chiralProjectPlus(psi[n-1]);
44  break;
45 
46  default:
47  QDP_error_exit("invalid option", isign);
48  }
49 
50  END_CODE();
51  }
52 
53 
54 } // End Namespace Chroma
Primary include file for CHROMA library code.
DWF parity/rotation operator.
void DwfFld(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign)
DWF parity/rotation operator.
Definition: dwffld_w.cc:24
unsigned n
Definition: ldumul_w.cc:36
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
@ MINUS
Definition: chromabase.h:45
@ PLUS
Definition: chromabase.h:45
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
START_CODE()