@@ -46,8 +46,6 @@ class relativistic_projector {
46
46
47
47
beta_.reextent ({nproj_, sphere_.size (), 2 });
48
48
kb_coeff_.reextent (nproj_);
49
-
50
- std::cout << " NUM " << ps.num_projectors_l () << std::endl;
51
49
52
50
int iproj_lm = 0 ;
53
51
for (int iproj = 0 ; iproj < ps.num_projectors_l (); iproj++){
@@ -150,10 +148,11 @@ class relativistic_projector {
150
148
gpu::array<complex, 3 > sphere_phi ({sphere_.size (), phi.local_spinor_set_size (), 2 });
151
149
152
150
gpu::run (phi.local_spinor_set_size (), sphere_.size (),
153
- [gr = begin (phi.spinor_hypercubic ()), sph = sphere_.ref (), sgr = begin (sphere_phi)] GPU_LAMBDA (auto ist, auto ipoint){
151
+ [gr = begin (phi.spinor_hypercubic ()), sph = sphere_.ref (), sgr = begin (sphere_phi), kpoint ] GPU_LAMBDA (auto ist, auto ipoint){
154
152
auto point = sph.grid_point (ipoint);
155
- sgr[ipoint][ist][0 ] = gr[point[0 ]][point[1 ]][point[2 ]][0 ][ist];
156
- sgr[ipoint][ist][1 ] = gr[point[0 ]][point[1 ]][point[2 ]][1 ][ist];
153
+ auto phase = polar (1.0 , dot (kpoint, sph.point_pos (ipoint)));
154
+ sgr[ipoint][ist][0 ] = phase*gr[point[0 ]][point[1 ]][point[2 ]][0 ][ist];
155
+ sgr[ipoint][ist][1 ] = phase*gr[point[0 ]][point[1 ]][point[2 ]][1 ][ist];
157
156
});
158
157
159
158
gpu::array<complex, 2 > projections ({nproj_, phi.local_spinor_set_size ()});
@@ -187,8 +186,9 @@ class relativistic_projector {
187
186
});
188
187
189
188
gpu::run (phi.local_spinor_set_size (), sphere_.size (),
190
- [gr = begin (vnlphi.spinor_hypercubic ()), sph = sphere_.ref (), nproj = nproj_, bet = begin (beta_), proj = begin (projections)] GPU_LAMBDA (auto ist, auto ip){
189
+ [gr = begin (vnlphi.spinor_hypercubic ()), sph = sphere_.ref (), nproj = nproj_, bet = begin (beta_), proj = begin (projections), kpoint ] GPU_LAMBDA (auto ist, auto ip){
191
190
auto point = sph.grid_point (ip);
191
+ auto phase = polar (1.0 , -dot (kpoint, sph.point_pos (ip)));
192
192
193
193
auto red0 = complex (0.0 , 0.0 );
194
194
auto red1 = complex (0.0 , 0.0 );
@@ -198,8 +198,8 @@ class relativistic_projector {
198
198
red1 += bet[iproj][ip][1 ]*pp;
199
199
}
200
200
201
- gpu::atomic::add (&gr[point[0 ]][point[1 ]][point[2 ]][0 ][ist], red0);
202
- gpu::atomic::add (&gr[point[0 ]][point[1 ]][point[2 ]][1 ][ist], red1);
201
+ gpu::atomic::add (&gr[point[0 ]][point[1 ]][point[2 ]][0 ][ist], phase* red0);
202
+ gpu::atomic::add (&gr[point[0 ]][point[1 ]][point[2 ]][1 ][ist], phase* red1);
203
203
204
204
});
205
205
}
0 commit comments