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

avoid division by zero in set/getArrivalTime #36

Merged

Conversation

YokoHono
Copy link
Contributor

@YokoHono YokoHono commented Nov 6, 2024

For small dx and dy, localBMapSizeX and localBMapSizeY can turn into 0, which subsequently leads to a division by zero in setArrivalTime and getArrivalTime.

Added a check that assigns 1 instead of 0 as the minimum localBMapSize.

Copy link
Contributor

@filippi filippi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
It is a strange case where the burning map is just one point wide for a heat flux matrix computation, ok to have a failsafe option, but maybe a warning should be issued.

@filippi filippi merged commit 8f039c4 into forefireAPI:master Nov 11, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants