Repository navigation
fix(core): a front reaching the domain edge no longer floods the arrival map (#233) - #240
Merged
Merged
Conversation
…val map (forefireAPI#233) Missing data turned into NaN node positions, and a NaN bounding box made the burning scan cover the whole map: - data layers returned NaN between the domain edge and the outermost cell centres; they now hold the edge cells there (still NaN outside the layer); - the slope ahead of a node past the edge was NaN; it is now taken behind; - a NaN spread rate now stops the node instead of giving it a NaN velocity; - Farsite returned 0/0 on non-burnable cells; it now returns 0. Also fixes the Y bound of singlePolygonAreaBurningScan (/ for +).
HugoFara
force-pushed
the
fix/edge-flood
branch
from
October 30, 2026 11:21
bf031ee to
657076a
Compare
filippi
approved these changes
Oct 31, 2026
filippi
left a comment
Contributor
There was a problem hiding this comment.
That was big bug, thanks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #233. The flood came from NaN positions reaching the burning scan: a NaN bounding box makes it cover the whole grid, and a two-vertex retracting polygon marks every cell as burnt. Missing data produced the NaN in four places:
NCXYZTDataLayer.h): values sit at cell centres, and since 6b5f6e1, bilinear lookups return NaN past the outermost centres. That covers half a cell inside every domain edge, so a quarter of a 2×2 wind layer has no wind. Inside the layer, that band now holds the edge cells; outside the layer, lookups still return NaN.GradientDataLayer.h): a node at the edge looks one step ahead, out of the domain. When nothing is there, it now looks one step behind.FireNode.cpp): a NaN spread rate gave a NaN velocity, which neighbours then used. A NaN rate now means no spread.Also:
singlePolygonAreaBurningScanhad/for+in its Y bound.Tests: 4 new unit cases: edge band, outside the layer, Farsite with no fuel, and a front run into the edge over a gridded altitude. Without the fix, the edge run segfaults and the others fail, except "outside the layer", which is unchanged on purpose. Unit tests: 55/55. ctest: 12/12. Moisture invariants hold. On the Mineral repro, the front reaches the east edge, stops there, and the rest keeps spreading to 60 h with no flood.
Drafted with Claude Opus 5.5.