Skip to content

Commit

Permalink
Merge pull request #36 from YokoHono/fix-division-by-zero-in-fire-domain
Browse files Browse the repository at this point in the history
avoid division by zero in set/getArrivalTime
  • Loading branch information
filippi authored Nov 11, 2024
2 parents d615b9d + 646f2a9 commit 8f039c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FireDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2584,11 +2584,12 @@ void FireDomain::loadWindDataInBinary(double refTime){
// Burning map resolution
BMapsResolution = getBurningMapResolution(spatialIncrement
, params->getDouble("minimalPropagativeFrontDepth"));

localBMapSizeX = (size_t) (dx/BMapsResolution );
if ( localBMapSizeX < 1 ) localBMapSizeX = 1;
params->setDouble("bmapResolution", BMapsResolution);
params->setSize("localBMapSizeX", localBMapSizeX);
localBMapSizeY = (size_t) (dy/BMapsResolution);
if ( localBMapSizeY < 1 ) localBMapSizeY = 1;
params->setSize("localBMapSizeY", localBMapSizeY);
globalBMapSizeX = atmoNX*localBMapSizeX;
globalBMapSizeY = atmoNY*localBMapSizeY;
Expand Down

0 comments on commit 8f039c4

Please sign in to comment.