CHROMA
util_compute_meson_s.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Wrapper code to compute staggered meson correlators.
3  *
4  * Spectrum calculations
5  */
6 
7 #include "handle.h"
8 //#include "actions/ferm/fermbcs/fermbcs.h"
10 #include "meas/hadron/hadron_s.h"
11 #include "meas/smear/fuzz_smear.h"
12 #include "meas/sources/srcfil.h"
13 #include "util/ferm/transf.h"
16 
18 
19 namespace Chroma
20 {
21 
22 
24  LatticeStaggeredPropagator & quark_propagator_Lsink_Lsrc,
25  LatticeStaggeredPropagator & quark_propagator_Fsink_Lsrc,
26  LatticeStaggeredPropagator & quark_propagator_Lsink_Fsrc,
27  LatticeStaggeredPropagator & quark_propagator_Fsink_Fsrc,
28  const multi1d<LatticeColorMatrix> & u ,
29  bool gauge_shift, bool sym_shift ,
30  XMLWriter & xml_out,
31  int j_decay,int t_length, int t_source){
32 
33  Stag_shift_option type_of_shift;
34 
35  if((gauge_shift) && (sym_shift)){
36  type_of_shift=SYM_GAUGE_INVAR;
37  }else{
38  if((gauge_shift) && (!sym_shift)){
39  type_of_shift=GAUGE_INVAR;
40  }else{
41  if((!gauge_shift) && (sym_shift)){
42  type_of_shift=SYM_NON_GAUGE_INVAR;
43  }else{
44  if((!gauge_shift) && (!sym_shift)){
45  type_of_shift=NON_GAUGE_INVAR ;
46  }
47  }
48  }
49  }
50 
51 
52  staggered_local_pion pion(t_length,u, type_of_shift) ;
53 
54 
55 push(xml_out,"Meson_correlators");
56 
57  // ---------- LL ----------
58  pion.compute(quark_propagator_Lsink_Lsrc,
59  quark_propagator_Lsink_Lsrc,j_decay);
60 
61 
62  push(xml_out, "Lsink_Lsrc");
63 
64  pion.dump(t_source,xml_out);
65 
66  pop(xml_out);
67 
68  // ---------- FL ----------
69  pion.compute(quark_propagator_Lsink_Lsrc,
70  quark_propagator_Fsink_Lsrc,j_decay);
71  push(xml_out, "Fsink_Lsrc");
72  pion.dump(t_source,xml_out);
73  pop(xml_out);
74 
75 
76  // ---------- LF ----------
77  pion.compute(quark_propagator_Lsink_Lsrc,
78  quark_propagator_Lsink_Fsrc,j_decay);
79  push(xml_out, "Lsink_Fsrc");
80  pion.dump(t_source,xml_out);
81  pop(xml_out);
82 
83 
84  // ---------- FF ----------
85  pion.compute(quark_propagator_Lsink_Lsrc,
86  quark_propagator_Fsink_Fsrc,j_decay);
87  push(xml_out, "Fsink_Fsrc");
88  pion.dump(t_source,xml_out);
89  pop(xml_out);
90 
91  // ---------------------------------------
92  pop(xml_out);
93 
94  QDPIO::cout << "Computed variational fuzzed mesons" << std::endl;
95 
96  }
97 
98  void compute_vary_scalar(LatticeStaggeredPropagator& prop_Lsn_Lsr,
99  LatticeStaggeredPropagator& prop_Fsn_Lsr,
100  LatticeStaggeredPropagator& prop_Lsn_Fsr,
101  LatticeStaggeredPropagator& prop_Fsn_Fsr,
102  const multi1d<LatticeColorMatrix>& u,
103  bool gauge_shift, bool sym_shift,
104  XMLWriter& xml_out, int j_decay, int t_length, int t_source)
105  {
106  Stag_shift_option type_of_shift;
107 
108  if (gauge_shift && sym_shift) {
109  type_of_shift = SYM_GAUGE_INVAR;
110  } else {
111  if ( gauge_shift && !sym_shift ) {
112  type_of_shift = GAUGE_INVAR;
113  } else {
114  if ( !gauge_shift && sym_shift ) {
115  type_of_shift = SYM_NON_GAUGE_INVAR;
116  } else {
117  if ( !gauge_shift && !sym_shift ) {
118  type_of_shift = NON_GAUGE_INVAR;
119  }
120  }
121  }
122  }
123 
124  staggered_local_scalar scalar(t_length, u, type_of_shift);
125 
126  push(xml_out, "Scalar_multichannel");
127  scalar.compute(prop_Lsn_Lsr, prop_Lsn_Lsr, j_decay);
128  push(xml_out, "Lsink_Lsrc");
129  scalar.dump(t_source,xml_out);
130  pop(xml_out);
131 
132  scalar.compute(prop_Lsn_Lsr, prop_Lsn_Fsr, j_decay);
133  push(xml_out, "Fsink_Lsrc");
134  scalar.dump(t_source,xml_out);
135  pop(xml_out);
136 
137  scalar.compute(prop_Lsn_Lsr, prop_Lsn_Fsr, j_decay);
138  push(xml_out, "Lsink_Fsrc");
139  scalar.dump(t_source,xml_out);
140  pop(xml_out);
141 
142  scalar.compute(prop_Lsn_Lsr, prop_Fsn_Fsr, j_decay);
143  push(xml_out, "Fsink_Fsrc");
144  scalar.dump(t_source,xml_out);
145  pop(xml_out);
146 
147  pop(xml_out);
148 
149  QDPIO::cout << "Computed multichannel local scalar\n";
150  }
151 
152 
153 } // end of namespace
void dump(int t_source, XMLWriter &xml_out)
Definition: hadron_corr_s.h:33
void compute(LatticeStaggeredPropagator &quark_prop_A, LatticeStaggeredPropagator &quark_prop_B, int j_decay)
Definition: pion_local_s.cc:56
void compute(LatticeStaggeredPropagator &quark_prop_A, LatticeStaggeredPropagator &quark_prop_B, int j_decay)
Fermion actions.
Fuzzed sources.
Hadronic observables.
Class for counted reference semantics.
int j_decay
Definition: meslate.cc:22
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void compute_vary_scalar(LatticeStaggeredPropagator &prop_Lsn_Lsr, LatticeStaggeredPropagator &prop_Fsn_Lsr, LatticeStaggeredPropagator &prop_Lsn_Fsr, LatticeStaggeredPropagator &prop_Fsn_Fsr, const multi1d< LatticeColorMatrix > &u, bool gauge_shift, bool sym_shift, XMLWriter &xml_out, int j_decay, int t_length, int t_source)
@ SYM_NON_GAUGE_INVAR
pop(xml_out)
void compute_vary_ps(LatticeStaggeredPropagator &quark_propagator_Lsink_Lsrc, LatticeStaggeredPropagator &quark_propagator_Fsink_Lsrc, LatticeStaggeredPropagator &quark_propagator_Lsink_Fsrc, LatticeStaggeredPropagator &quark_propagator_Fsink_Fsrc, const multi1d< LatticeColorMatrix > &u, bool gauge_shift, bool sym_shift, XMLWriter &xml_out, int j_decay, int t_length, int t_source)
Point source construction.
Compute staggered quark propagator.