CHROMA
mespbp_s.cc
Go to the documentation of this file.
1 namespace Chroma {
2 
3 
4 /* $Id: mespbp_s.cc,v 3.0 2006-04-03 04:59:04 edwards Exp $ ($Date: 2006-04-03 04:59:04 $) */
5 
6 /* This routine is specific to staggered fermions! */
7 
8 /* Calculates psi_bar_psi */
9 
10 /* u -- gauge field ( Read ) */
11 /* psi_bar_psi -- chiral condensate ( Write ) */
12 /* n_congrd -- Number of CG iteration ( Write ) */
13 /* ichiral -- not used here! ( Read ) */
14 
15 include(types.mh)
16 
17 SUBROUTINE(MesPbp, u, psi_bar_psi, n_congrd, ichiral)
18 
19 multi1d<LatticeColorMatrix> u(Nd);
20 int n_congrd;
21 int ichiral;
23 { /* Local Variables */
24  include(COMMON_DECLARATIONS)
25 
26  LatticeStaggeredFermion eta;
27  LatticeStaggeredFermion aux;
28  LatticeStaggeredFermion tmp;
29  LatticeStaggeredFermion psi;
30 
32 
33  START_CODE();
34 
35  phfctr (u, FORWARD); /* ON */
36 
37 
38  /* Fill aux with random gaussian noise such that < aux_dagger * aux > = 1 */
39  /* for even sites */
41 
42 
43  /* Fill eta with random gaussian noise such that < eta_dagger * eta > = 1 */
44  /* for odd sites */
46 
47  /* For Schroedinger functional: mask out noise on boundaries */
48  if ( SchrFun > 0 )
49  {
50  FILLMASK(aux, lSFmaskF(0), ZERO);
51  FILLMASK(eta, lSFmaskF(1), ZERO);
52  }
53 
54 
55  /* tmp = D'_dag*eta_e */
56  dslash (u, eta, tmp, MINUS, 1);
57 
58  /* aux = aux + KappaMC*tmp = M_dag * "Guassian noise" */
59  aux += tmp * KappaMC;
60 
61 
62  /* computing the norm of aux aux_norm = | aux | */
63  aux_norm = norm2(aux);
64  aux_norm = sqrt(aux_norm);
65 
66 
67  /* psi = (M_dag*M)^(-1) * aux */
68  psi = 0;
70 
71  /* Chiral condensate = Tr [ psi * psi_dag ] = Sum | psi |^2 */
72  psi_bar_psi = norm2(psi);
73 
74 
75  psi_bar_psi = WORD_VALUE(WORD_psi_bar_psi,TWO) * TO_DOUBLE(KappaMC) *
76  psi_bar_psi / TO_DOUBLE(vol_cb*Nc);
77 
78  phfctr (u, BACKWARD); /* OFF */
79 
80  END_CODE();
81 }
82 
83 } // end namespace Chroma
EXTERN Real KappaMC
EXTERN Real RsdCGMC
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
phfctr(u, FORWARD)
Double psi_bar_psi
Definition: mespbp_s.cc:22
LatticeStaggeredFermion aux
Definition: mespbp_s.cc:23
static multi1d< LatticeColorMatrix > u
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
int n_congrd
Definition: mespbg5p_w.cc:24
int ichiral
Definition: mespbp_s.cc:21
@ MINUS
Definition: chromabase.h:45
dslash(u, eta, tmp, MINUS, 1)
invert(u, aux, psi, aux_norm, KappaMC, RsdCGMC, 1, n_congrd)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
LatticeFermion eta
Definition: mespbg5p_w.cc:37
void MesPbp(Handle< SystemSolver< LatticeFermion > > qprop, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, const multi1d< Real > &Mass, const int ichiral, XMLWriter &xml_out, const std::string &xml_group, const std::string &FermAct)
Calculates noise estimator for psi_bar_psi.
Definition: mespbp_w.cc:22
START_CODE()
Double aux_norm
Definition: mespbp_s.cc:31
include(types.mh) LINEAR_OPERATOR(A)
FloatingPoint< double > Double
Definition: gtest.h:7351
#define FORWARD
Definition: primitives.h:82
#define BACKWARD
Definition: primitives.h:83
#define TWO
#define ZERO