Skip to content

Commit

Permalink
avoid initial elem search in cone/arcsine source launch
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Apr 30, 2019
1 parent caa0a65 commit cbdcb1e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tettracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1540,9 +1540,8 @@ void launchphoton(mcconfig *cfg, ray *r, tetmesh *mesh, RandType *ran, RandType
r->vec.y=stheta*sphi;
r->vec.z=ctheta;
canfocus=0;
if(cfg->srctype==stIsotropic)
if(r->eid>0)
return;
if(r->eid>0)
return;
}else if(cfg->srctype==stZGaussian){
float ang,stheta,ctheta,sphi,cphi;
ang=TWO_PI*rand_uniform01(ran); //next arimuth angle
Expand Down

0 comments on commit cbdcb1e

Please sign in to comment.