Commit 176a9b1cfe888959db8f96e6318ad528bc4b6dc4
1 parent
2939de60
fixed type mismatch (complex float and complex double) in scalarmie.h lines 392, 652
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
stim/optics/scalarmie.h
... | ... | @@ -389,7 +389,7 @@ void cpu_scalar_mie_scatter(stim::complex<T>* E, size_t N, T* x, T* y, T* z, std |
389 | 389 | r = p.len(); |
390 | 390 | if(r >= a){ |
391 | 391 | for(size_t w = 0; w < W.size(); w++){ |
392 | - Ew = W[w].E() * exp(stim::complex<double>(0, W[w].kvec().dot(c))); | |
392 | + Ew = W[w].E() * exp(stim::complex<float>(0, W[w].kvec().dot(c))); | |
393 | 393 | kr = p.len() * W[w].kmag(); //calculate k*r |
394 | 394 | stim::bessjyv_sph<double>(Nl, kr, vm, j_kr, y_kr, dj_kr, dy_kr); |
395 | 395 | cos_phi = p.norm().dot(W[w].kvec().norm()); //calculate the cosine of the angle from the propagating direction |
... | ... | @@ -649,7 +649,7 @@ void cpu_scalar_mie_internal(stim::complex<T>* E, size_t N, T* x, T* y, T* z, st |
649 | 649 | if(r < a){ |
650 | 650 | E[i] = 0; |
651 | 651 | for(size_t w = 0; w < W.size(); w++){ |
652 | - Ew = W[w].E() * exp(stim::complex<double>(0, W[w].kvec().dot(c))); | |
652 | + Ew = W[w].E() * exp(stim::complex<float>(0, W[w].kvec().dot(c))); | |
653 | 653 | knr = (stim::complex<double>)n * p.len() * W[w].kmag(); //calculate k*n*r |
654 | 654 | |
655 | 655 | stim::cbessjyva_sph<double>(Nl, knr, vm, j_knr, y_knr, dj_knr, dy_knr); | ... | ... |