Skip to content

Commit 27901e2

Browse files
committed
Remove limitation that Phonon_simple only chooses first solution
1 parent 4f1f038 commit 27901e2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

mcstas-comps/samples/Phonon_simple.comp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ TRACE
463463
findroots_gpu(0, v_i, v_i+2*c*V2K/VS2E, vf_list, &nf, &parms);
464464
#endif
465465
index=(int)floor(rand01()*nf);
466-
if (index<2) {
466+
467467
v_f=vf_list[index];
468468
parms.vf=v_f-DV;
469469
f1=omega_q(&parms);
@@ -497,9 +497,7 @@ TRACE
497497
p4 = 2*VS2E*v_f/J_factor; /* Jacobian of delta functions in cross section */
498498
p5 = b*b/M; /* Cross section factor 2 */
499499
p *= p1*p2*p3*p4*p5;
500-
} else {
501-
ABSORB; // findroots returned junk
502-
}
500+
503501
} /* else transmit: Neutron did not hit the sample */
504502

505503
// Finally, set vf_list to zero again

0 commit comments

Comments
 (0)