Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in mcx_main_loop #40

Closed
lukasm91 opened this issue Jul 1, 2018 · 2 comments
Closed

Issue in mcx_main_loop #40

lukasm91 opened this issue Jul 1, 2018 · 2 comments

Comments

@lukasm91
Copy link

lukasm91 commented Jul 1, 2018

I was looking at your code and I found this line:
https://github.com/fangq/mcx/blob/master/src/mcx_core.cu#L1332

Is this correct? Shouldn't this be (v->y > 0.f)-(v->y < 0.f)? The same also for L1333.

@fangq
Copy link
Owner

fangq commented Jul 3, 2018

wow, can't believe this survived over 2 years! thanks for pointing this out! I will fix it right away.

BTW, the bug was introduced in this commit:
29ea426

@fangq fangq closed this as completed in 8aba23b Jul 3, 2018
@fangq
Copy link
Owner

fangq commented Jul 3, 2018

the issue is now fixed. the mcx_nextafterf() function increases or decreases the selected photon positions by eps (~1.19e-07 for float). This bug does not alter the simulation results significantly, but may introduce redundant calculations at the boundaries.

thanks again for reporting this. let me know if you see additional issues.

jdtatz pushed a commit to jdtatz/mcx that referenced this issue Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants