Skip to content

fix(core): a domain built without loadData takes its propagation model from the parameters - #243

Merged
filippi merged 2 commits into
forefireAPI:devfrom
HugoFara:fix/no-propagation-layer
Oct 31, 2026
Merged

filippi merged 2 commits into
forefireAPI:devfrom
HugoFara:fix/no-propagation-layer

Conversation

@HugoFara

Copy link
Copy Markdown
Collaborator

Should a bare FireDomain[...] spread with the propagationModel parameter, as loadData does? This PR assumes yes.

Today, a domain built without loadData and without addLayer("propagation", ...) has no propagation layer. The first goTo then segfaults in FireDomain::getPropagationSpeed, which dereferences a null propagativeLayer. Repro:

FireDomain[sw=(0,0,0);ne=(1000,1000,0);t=0]
startFire[loc=(500,500,0)]
goTo[t=100]

Fix: getPropagationSpeed now creates the missing layer on first use from propagationModel (default Iso), which is the rule loadData follows. If that model doesn't exist, it prints the same PROBLEM line as loadData and the fire doesn't spread.

Tests: 1 new unit case, which segfaults on dev. Unit 52/52, ctest 12/12.

Drafted with Claude Opus 5.5.

…l from the parameters

FireDomain[...] alone left no propagation layer, so the first goTo
dereferenced a null one. The layer is now created on first use from the
propagationModel parameter, as loadData does.
@HugoFara HugoFara added the bug Confirmed incorrect behavior label Oct 30, 2026

@filippi filippi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, ok, why not

@filippi
filippi merged commit c092831 into forefireAPI:dev Oct 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants