CHROMA
topol.cc
Go to the documentation of this file.
1 
2 #error "NOT FULLY CONVERTED"
3 
4 /* TOPOL - Run the cooling and naive topological charge routines on a */
5 /* gauge-field configuration. */
6 
7 include(types.mh)
8 
9 SUBROUTINE(topol, u, TopAccu, ActAccu, NumCool, NumTop)
10 
11 multi1d<LatticeColorMatrix> u(Nd);
12 Real TopAccu;
13 Real ActAccu;
14 int NumCool; /* Total number of cooling sweeps */
15 int NumTop; /* Frequency of charge measurement */
16 {
17 
18 include(COMMON_DECLARATIONS)
19 
20 /* local variables */
21 multi1d<Double> qtop(NumTop); /* Topological charge */
22 multi1d<Double> S_ratio(NumTop); /* Action/continuum instanton action */
23 
27 int i_cool;
28 int n;
31 
33 
34 
35 /* Do topology measurement on the initial "hot" configuration */
37 qtop[0] = ftmp1;
39 
40 conviter = 0;
41 qtop_conv = 0;
42 S_ratio_conv = 0;
43 
44 /* Do the cooling sweeps and topology measurements */
45 for(n=1; n<NumTop; ++n)
46 {
47  for(i_cool=0; i_cool<NumCool; ++i_cool)
48  cool (u);
49 
50  qnaive (u, ftmp1, ftmp2);
51  qtop[n] = ftmp1;
52  S_ratio[n] = ftmp2;
53 
54  FPRINTF(trm_out,"k= %d qtop= %g S_ratio= %g\n",n,qtop[n],S_ratio[n]);
55 
56  ftmp1 = qtop[n] - qtop[n-1];
57  ftmp1 = fabs(ftmp1);
58  ftmp2 = S_ratio[n] - S_ratio[n-1];
59  ftmp2 = fabs(ftmp2);
60 
61  if ( (conviter == 0) && (ftmp1 < TopAccu) && (ftmp2 < ActAccu) )
62  {
63  conviter = n;
64  qtop_conv = qtop[n];
66  FPRINTF(trm_out,"Convergence at k= %d\n",n);
67  }
68 }
69 
70 push(xml_out,"Cooled_Topology");
71 write(xml_out, "NumTop", NumTop);
72 write(xml_out, "NumCool", NumCool);
73 write(xml_out, "conviter", conviter);
74 write(xml_out, "qtop_conv", qtop_conv);
75 write(xml_out, "S_ratio_conv", S_ratio_conv);
76 write(xml_out, "qtop", qtop);
77 write(xml_out, "S_ratio", S_ratio);
78 pop(xml_out);
79 
80 
82 }
Nd
Definition: meslate.cc:74
static multi1d< LatticeColorMatrix > u
FloatingPoint< double > Double
Definition: gtest.h:7351
START_CODE()
Double qtop_conv
Definition: topol.cc:24
push(xml_out,"Cooled_Topology")
Double ftmp1
Definition: topol.cc:29
Double S_ratio_conv
Definition: topol.cc:25
Real TopAccu
Definition: topol.cc:12
write(xml_out, "NumTop", NumTop)
END_CODE()
int i_cool
Definition: topol.cc:27
Double ftmp2
Definition: topol.cc:30
int NumTop
Definition: topol.cc:15
int n
Definition: topol.cc:28
qtop[0]
Definition: topol.cc:37
int conviter
Definition: topol.cc:26
qnaive(u, ftmp1, ftmp2)
Real ActAccu
Definition: topol.cc:13
include(types.mh) multi1d< LatticeColorMatrix > u(Nd)
int NumCool
Definition: topol.cc:14
pop(xml_out)
S_ratio[0]
Definition: topol.cc:38