firelab / behave

A new implementation of the extended Rothermel model
Other
11 stars 8 forks source link

Update scorchHeight computation in calculateMortalityCrownScorch #33

Closed Kcheung42 closed 4 weeks ago

Kcheung42 commented 1 month ago
rjsheperd commented 4 weeks ago

This is looking good :+1:

Doxygen Documentation

Considering the project uses Doxygen to document the project, it would be good to stick with their conventions.

To deprecate a function or member variable, you can use the \deprecated special tag. Here's how that would look:

Function Example:

/** 
 * \deprecated
 */
void MortalityInputs::setFlameLengthOrScorchHeightSwitch(FlameLengthOrScorchHeightSwitch flameLengthOrScorchHeightSwitch)
{
  ...
}

Member Variable Example:

class MortalityInputs {
  ...
  double flameLengthOrScorchHeightValue_; /**< \deprecated */
}
src/behave/mortality_inputs.h

L106, 107 - Add Member Variable \deprecated comment as shown above.

src/behave/mortality_inputs.cpp

L96, 102 - Add function \deprecated comment as shown above.

src/behave/mortality.h

L 34, 45 - Can remove the // deprecated comments since they will be documented in the .cpp file. L106, 107 - Add Member Variable \deprecated comment as shown above.

src/behave/mortality.cpp

L121, 126 - Add function \deprecated comment as shown above.

L491 - Redundant conversion using LengthUnits::fromBaseUnits. This is already being performed inside of MortalityInputs::getFlameLength You can simply return flameLength;

L582 - Move these two assignments to two separate lines. Best to keep to one assignment per line.

Fl = getFlameLength(LengthUnits::Feet);
blackHillsFlameLength = Fl;
Kcheung42 commented 4 weeks ago

Just as a note, only flameLengthOrScorchHeightValue_ is being deprecated. I kept flameLengthOrScorchHeightSwitch_ around so that it would not break when mortality is ran on it's own, since in our app the user can specify which type of input to use.