CHROMA
t_mesons_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Test the Wilson mesons() routine
3  */
4 
5 #include <iostream>
6 #include <cstdio>
7 #include <time.h>
8 
9 #include "chroma.h"
10 
11 using namespace Chroma;
12 
13 int main(int argc, char *argv[])
14 {
15  // Put the machine into a known state
16  Chroma::initialize(&argc, &argv);
17 
18  // Setup the layout
19  const int foo[] = {4,4,4,4};
20  multi1d<int> nrow(Nd);
21  nrow = foo; // Use only Nd elements
22  Layout::setLattSize(nrow);
23  Layout::create();
24 
25  XMLFileWriter xml("t_mesons_w.xml");
26  push(xml,"t_mesons_w");
27 
28  push(xml,"lattice");
29  write(xml,"Nd", Nd);
30  write(xml,"Nc", Nc);
31  write(xml,"Ns", Ns);
32  write(xml,"nrow", nrow);
33  pop(xml);
34 
35  LatticePropagator quark_prop_1, quark_prop_2;
36  gaussian(quark_prop_1);
37  gaussian(quark_prop_2);
38 
39  // propagation direction
40  int j_decay = Nd-1 ;
41 
42  // source timeslice
43  int t0 = 0 ;
44 
45  clock_t start_clock = clock() ;
46  // create averaged Fourier phases with (mom)^2 <= 10
47  SftMom phases(10, true, j_decay) ;
48 
49  mesons(quark_prop_1, quark_prop_2, phases, t0, xml,
50  "Point_Point_Wilson_Mesons") ;
51 
52  clock_t end_clock = clock() ;
53 
54  QDPIO::cout << "Test took " << end_clock - start_clock << " clocks.\n" ;
55 
56  pop(xml);
57 
58  // Time to bolt
60 
61  exit(0);
62 }
63 
Primary include file for CHROMA in application codes.
Fourier transform phase factor support.
Definition: sftmom.h:35
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void mesons(const LatticePropagator &quark_prop_1, const LatticePropagator &quark_prop_2, const SftMom &phases, int t0, XMLWriter &xml, const std::string &xml_group)
Meson 2-pt functions.
Definition: mesons_w.cc:111
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
pop(xml_out)
int main(int argc, char *argv[])
Definition: t_mesons_w.cc:13