CHROMA
t_hypsmear.cc
Go to the documentation of this file.
1 
2 #include <iostream>
3 #include <cstdio>
4 
5 #include "chroma.h"
6 
7 using namespace Chroma;
8 
9 int main(int argc, char *argv[])
10 {
11  // Put the machine into a known state
12  Chroma::initialize(&argc, &argv);
13 
14  // Setup the layout
15  const int foo[] = {4,4,4,8};
16  multi1d<int> nrow(Nd);
17  nrow = foo; // Use only Nd elements
18  Layout::setLattSize(nrow);
19  Layout::create();
20 
21  XMLFileWriter xml("t_hypsmear.xml");
22  push(xml,"t_hypsmear");
23 
24  push(xml,"lattis");
25  write(xml,"Nd", Nd);
26  write(xml,"Nc", Nc);
27  write(xml,"nrow", nrow);
28  pop(xml);
29 
30  //! Example of calling a plaquette routine
31  /*! NOTE: the STL is *not* used to hold gauge fields */
32  multi1d<LatticeColorMatrix> u(Nd);
34 
35 // QDPIO::cout << "Reading test_purgaug.cfg1\n";
36 // Seed seed_old;
37 // readSzin(u, 0, "../test_purgaug.cfg1", seed_old);
38  QDPIO::cout << "Start gaussian\n";
39  for(int m=0; m < u.size(); ++m)
40  gaussian(u[m]);
41 
42  // Reunitarize the gauge field
43  for(int m=0; m < u.size(); ++m)
44  reunit(u[m]);
45 
46  // Try out the plaquette routine
48  QDPIO::cout << "w_plaq = " << w_plaq << std::endl;
49  QDPIO::cout << "link = " << link << std::endl;
50 
51  // Write out the results
52  push(xml,"observables");
53  write(xml,"w_plaq", w_plaq);
54  write(xml,"link", link);
55  pop(xml);
56 
57  // Now hyp smear
58  multi1d<LatticeColorMatrix> u_hyp(Nd);
59  Real BlkAccu = 1.0e-5;
60  int BlkMax = 100;
61  Real alpha1 = 0.7;
62  Real alpha2 = 0.6;
63  Real alpha3 = 0.3;
64  Hyp_Smear(u, u_hyp, alpha1, alpha2, alpha3, BlkAccu, BlkMax);
65 
66  // Measure again
67  MesPlq(u_hyp, w_plaq, s_plaq, t_plaq, link);
68  QDPIO::cout << "w_plaq = " << w_plaq << std::endl;
69  QDPIO::cout << "link = " << link << std::endl;
70 
71  // Write out the results
72  push(xml,"HYP_observables");
73  write(xml,"w_plaq", w_plaq);
74  write(xml,"link", link);
75  pop(xml);
76 
77  pop(xml);
78 
79  // Time to bolt
81 
82  exit(0);
83 }
Primary include file for CHROMA in application codes.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void Hyp_Smear(const multi1d< LatticeColorMatrix > &u, multi1d< LatticeColorMatrix > &u_hyp, const Real &alpha1, const Real &alpha2, const Real &alpha3, const Real &BlkAccu, int BlkMax)
Construct the "hyp-smeared" links of Anna Hasenfratz.
Definition: hyp_smear.cc:30
static int m[4]
Definition: make_seeds.cc:16
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
static multi1d< LatticeColorMatrix > u
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
void reunit(LatticeColorMatrixF3 &xa)
Definition: reunit.cc:467
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
FloatingPoint< double > Double
Definition: gtest.h:7351
Double link
Definition: pade_trln_w.cc:146
Double t_plaq
Definition: pade_trln_w.cc:145
Double w_plaq
Definition: pade_trln_w.cc:143
Double s_plaq
Definition: pade_trln_w.cc:144
int main(int argc, char *argv[])
Definition: t_hypsmear.cc:9