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

Divide by zero crash #1

Open
gdevenyi opened this issue Dec 7, 2015 · 1 comment
Open

Divide by zero crash #1

gdevenyi opened this issue Dec 7, 2015 · 1 comment

Comments

@gdevenyi
Copy link

gdevenyi commented Dec 7, 2015

Documenting:

The root cause of the bug is that the if conditions in lines 61:78 in the cythonLaplaceStep function are sometimes not satisfied, and since counter starts at 0.0, and never increments, line tmpvalue = tmpvalue / counter results in a divide by zero error which crashes the program. For now I’ve wrapped the division in a check for if the counter is >0, but I need to check if perhaps there should be an else clause that would be more appropriate. The solution for the non-crashing left surface seem to be identical, so this looks okay.

@gdevenyi
Copy link
Author

gdevenyi commented Dec 7, 2015

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

1 participant