FireSTARR
Loading...
Searching...
No Matches
fs::sim::IntensityMap Class Reference

Represents a map of intensities that cells have burned at for a single Scenario. More...

#include <IntensityMap.h>

Collaboration diagram for fs::sim::IntensityMap:

Public Member Functions

 IntensityMap (const Model &model) noexcept
 Constructor.
 
 IntensityMap (const IntensityMap &rhs)
 
 IntensityMap (IntensityMap &&rhs)=delete
 
IntensityMapoperator= (const IntensityMap &rhs)=delete
 
IntensityMapoperator= (IntensityMap &&rhs) noexcept=delete
 
Idx rows () const
 Number of rows in this extent.
 
Idx columns () const
 Number of columns in this extent.
 
void applyPerimeter (const topo::Perimeter &perimeter) noexcept
 Set cells in the map to be burned based on Perimeter.
 
bool canBurn (const Location &location) const
 Whether or not the Cell with the given hash can burn.
 
template<class P >
bool canBurn (const Position< P > &position) const
 
bool hasBurned (const Location &location) const
 Whether or not the Location with the given hash can burn.
 
template<class P >
bool hasBurned (const Position< P > &position) const
 
bool isSurrounded (const Location &location) const
 Whether or not all Locations surrounding the given Location are burned.
 
template<class P >
bool isSurrounded (const Position< P > &position) const
 
void ignite (const Location &location)
 Mark given location as burned.
 
template<class P >
void ignite (const Position< P > &position)
 
void burn (const Location &location, IntensitySize intensity, MathSize ros, fs::wx::Direction raz)
 Update Location with specified values.
 
template<class P >
void burn (const Position< P > &position, const IntensitySize intensity, const MathSize ros, const fs::wx::Direction &raz)
 
void save (const string &dir, const string &base_name) const
 Save contents to an ASCII file.
 
MathSize fireSize () const
 Size of the fire represented by this.
 
map< Location, IntensitySize >::const_iterator cbegin () const noexcept
 Iterator for underlying GridMap.
 
map< Location, IntensitySize >::const_iterator cend () const noexcept
 Iterator for underlying GridMap.
 

Private Attributes

mutex mutex_ {}
 Mutex for parallel access.
 
const Modelmodel_
 Model map is for.
 
unique_ptr< data::GridMap< IntensitySize > > intensity_max_
 Map of intensity that cells have burned at.
 
unique_ptr< data::GridMap< MathSize > > rate_of_spread_at_max_
 Map of rate of spread/direction that cells have burned with at max ros.
 
unique_ptr< data::GridMap< DegreesSize > > direction_of_spread_at_max_
 
BurnedData * is_burned_
 bitset denoting cells that can no longer burn
 

Detailed Description

Represents a map of intensities that cells have burned at for a single Scenario.

Constructor & Destructor Documentation

◆ IntensityMap()

fs::sim::IntensityMap::IntensityMap ( const Model & model)
explicitnoexcept

Constructor.

Parameters
modelModel to use extent from

Member Function Documentation

◆ applyPerimeter()

void fs::sim::IntensityMap::applyPerimeter ( const topo::Perimeter & perimeter)
noexcept

Set cells in the map to be burned based on Perimeter.

Parameters
perimeterPerimeter to burn cells based on

◆ burn()

void fs::sim::IntensityMap::burn ( const Location & location,
IntensitySize intensity,
MathSize ros,
fs::wx::Direction raz )

Update Location with specified values.

Parameters
locationLocation to burn
intensityIntensity to burn with (kW/m)
rosRate of spread to check against maximu (m/min)
razSpread azimuth for ros
Here is the call graph for this function:
Here is the caller graph for this function:

◆ canBurn()

bool fs::sim::IntensityMap::canBurn ( const Location & location) const
nodiscard

Whether or not the Cell with the given hash can burn.

Parameters
hashHash for Cell to check
Returns
Whether or not the Cell with the given hash can burn
Here is the call graph for this function:

◆ cbegin()

map< Location, IntensitySize >::const_iterator fs::sim::IntensityMap::cbegin ( ) const
nodiscardnoexcept

Iterator for underlying GridMap.

Returns
Iterator for underlying GridMap
Here is the caller graph for this function:

◆ cend()

map< Location, IntensitySize >::const_iterator fs::sim::IntensityMap::cend ( ) const
nodiscardnoexcept

Iterator for underlying GridMap.

Returns
Iterator for underlying GridMap
Here is the caller graph for this function:

◆ columns()

Idx fs::sim::IntensityMap::columns ( ) const
inlinenodiscard

Number of columns in this extent.

Returns
Number of columns in this extent
Here is the caller graph for this function:

◆ fireSize()

MathSize fs::sim::IntensityMap::fireSize ( ) const
nodiscard

Size of the fire represented by this.

Returns
Size of the fire represented by this

◆ hasBurned()

bool fs::sim::IntensityMap::hasBurned ( const Location & location) const
nodiscard

Whether or not the Location with the given hash can burn.

Parameters
hashHash for Location to check
Returns
Whether or not the Location with the given hash can burn
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ignite()

void fs::sim::IntensityMap::ignite ( const Location & location)

Mark given location as burned.

Parameters
locationLocation to burn
Here is the call graph for this function:

◆ isSurrounded()

bool fs::sim::IntensityMap::isSurrounded ( const Location & location) const
nodiscard

Whether or not all Locations surrounding the given Location are burned.

Parameters
locationLocation to check
Returns
Whether or not all Locations surrounding the given Location are burned
Here is the call graph for this function:

◆ rows()

Idx fs::sim::IntensityMap::rows ( ) const
inlinenodiscard

Number of rows in this extent.

Returns
Number of rows in this extent
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

void fs::sim::IntensityMap::save ( const string & dir,
const string & base_name ) const

Save contents to an ASCII file.

Parameters
dirDirectory to save to
base_nameBase file name to save to

The documentation for this class was generated from the following files: