forked from milc-qcd/milc_qcd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhqet_prop.c
230 lines (160 loc) · 5.29 KB
/
hqet_prop.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/*************************** hqet_prop.c *****************************/
/* MIMD version 6 */
/* $Header: /lqcdproj/detar/cvsroot/milc_qcd/hqet_heavy_to_light/hqet_prop.c,v 1.2 2005/03/31 00:01:58 detar Exp $
A collection of routines to generate hqet propagators
If v1 == v2, then a two point function is
generated (and tcurrent is ignored).
If v1 != v2 then a three point function is generated,
for t < tcurrent then update hqet propagator with velocity v1
v1 is the velocity of the hqet propagator for the
first set of time slices
Work space required in: lattice.h
work_space :: su3 matrix
s->tempvec[dir]) dir = 1 -->3 XUP .. TUP
This routine generates a possible hqet propagators from
0 to tend,
This code has been modified from the
dslash for Kogut-Susskind fermions
Evolution equation for HQET propagators
-----------------------------------------
See Mandula and Ogilvie
Phys.Rev D45 (1992) 2183
dagger
G(x,t+1) = U(x,t)_[4]
( 1 + \sum_{k=1}^{3} \frac{-i v_{\mu}{v_{0}}
( \Delta^{+}_{k} + \Delta^{-}_{k} ) ) G(x,t)
Subroutine arguments
hqet_prop :: (su3_matrix) heavy quark propagator
tend :: final time slice to generate to
tcurrent :: timeslice to insert the current
tstart :: the timeslice the source is on
v1 :: the velocity for t < tcurrent
v2 :: the velocity for t > tcurrent
*/
#include "hqet_light_includes.h"
#include<assert.h>
#ifdef DEBUGDEF
#include DEBUGDEF
#endif
static char rcs_id[] = "$Header: /lqcdproj/detar/cvsroot/milc_qcd/hqet_heavy_to_light/hqet_prop.c,v 1.2 2005/03/31 00:01:58 detar Exp $" ;
void generate_hqet_prop(field_offset hqet_prop, int tstart, int tend , int tcurrent,
int v1, int v2)
{
register int i,j,t;
register site *s;
msg_tag *tag[8];
int tloop ;
int nthalf = nt/2 ;
int dir ;
int jj ;
register su3_vector *a,*b1,*b2,*b3,*b4;
complex unorm[4] ;
/*************---------**********-------------************/
assert( tend > tstart ) ;
/** check to see whether to a two or three point function ***/
if( v1 == v2 )
{
tcurrent = tend + 4 ;
}
/** set up the renormalized velocity ****/
unorm[TUP].real =0.0 ; unorm[TUP].imag = 0.0 ;
for(jj =XUP ; jj <= ZUP ; ++jj)
{
unorm[jj].real =0.0 ;
unorm[jj].imag = velocity[v1][jj] /( 2.0 * velocity[v1][TUP] );
}
++tstart ; /*** tloop is the time slice of the required propagator ****/
for(tloop=tstart ; tloop <= tend ; ++tloop)
{
if( tloop > tcurrent )
{
for(jj =XUP ; jj <= ZUP ; ++jj)
{
unorm[jj].real =0.0 ;
unorm[jj].imag = velocity[v2][jj] /( 2.0 * velocity[v2][TUP] ) ;
}
}
/***----- spatial parts of the evolution equation ------***/
/* Start gathers of the propagator from positive directions */
for(dir=XUP; dir<=ZUP; dir++)
{
tag[dir] = start_gather_site( hqet_prop, sizeof(su3_matrix), dir, EVENANDODD,
gen_pt[dir] );
}
/*
* tmpvec[i] = U_{\mu}^{\dagger}(x-i,t) s(x-i)
*/
/* Multiply by adjoint matrix at other sites */
FORALLSITES(i,s)
{
for(dir=XUP; dir<=ZUP; dir++)
{
mult_su3_an_z(unorm[dir] , &(s->link[dir]),
(su3_matrix *)F_PT(s,hqet_prop), &(s->tempvec[dir]) );
}
}
/* Start gathers from negative directions */
for( dir=XUP; dir <= ZUP; dir++)
{
tag[OPP_DIR(dir)] = start_gather_site( F_OFFSET(tempvec[dir]),
sizeof(su3_matrix), OPP_DIR( dir), EVENANDODD ,
gen_pt[OPP_DIR(dir)] );
}
/* Wait gathers from positive directions *******/
for(dir=XUP; dir<=ZUP; dir++)
{
wait_gather(tag[dir]);
}
FORALLSITES(i,s)
{
su3mat_copy((su3_matrix *)F_PT(s,hqet_prop) , &(s->tempvec[ TUP ]) );
for(dir=XUP; dir<=ZUP; dir++)
{
mult_su3_nn_z_inc( unorm[dir] ,&(s->link[dir]),(su3_matrix *)(gen_pt[dir][i]),
&(s->tempvec[ TUP ]) );
}
}
/* Wait gathers from negative directions */
for(dir=XUP; dir<=ZUP; dir++)
{
wait_gather(tag[OPP_DIR(dir)]);
}
FORALLSITES(i,s)
{
sub3_su3_matrix((su3_matrix *)(gen_pt[XDOWN][i]) ,
(su3_matrix *)(gen_pt[YDOWN][i]) ,
(su3_matrix *)(gen_pt[ZDOWN][i]) ,
&(s->tempvec[ TUP ])) ;
}
/*
* Calculate the hqet propagator for positive time
*
* W(t+1) = U_4(t)^{\dagger} W(t)
*
* Evolve the HQET propagator forward in time
*
*
* Note: the structure tempvec[XUP] is used as new work space
*/
FORALLSITES(i,s)
{
mult_su3_an(&(s->link[TUP]), (su3_matrix *) &(s->tempvec[ TUP ]) , &(s->tempvec[XUP]));
}
/* Pull the w(t)*u(t) from the previous time slice ***/
tag[TDOWN]=start_gather_site( F_OFFSET(tempvec[XUP]), sizeof(su3_matrix),
TDOWN, EVENANDODD, gen_pt[TDOWN] );
wait_gather(tag[TDOWN]);
FORALLSITES(i,s)
{
if( s-> t == tloop )
su3mat_copy((su3_matrix *) gen_pt[TDOWN][i], (su3_matrix *) F_PT(s,hqet_prop) );
}
/*** free up the message passing bufffers ****/
cleanup_gather(tag[TDOWN]);
for(dir=XUP; dir<=ZUP; dir++)
{
cleanup_gather(tag[dir]);
cleanup_gather(tag[OPP_DIR(dir)]);
}
} /* end the loop over time slice ***/
} /*** end of the function ****/