Main Page   Compound List   File List   Compound Members   File Members  

Ignition.c File Reference

#include "Ignition.h"

Go to the source code of this file.

Functions

int IsIgnitionNowFIXEDFromProps (ChHashTable * proptbl)
 Tests whether an ignition occurs during current timestep. More...

int IsIgnitionNowRANDFromProps (ChHashTable * proptbl)
 Tests whether an ignition occurs during current timestep. More...

int GetIgnitionLocFIXEDFromProps (ChHashTable * proptbl, FireYear * fy, List ** rwxylist)
 Returns a list of ignition locations in real world coordinates. More...

int GetIgnitionLocRANDUFromProps (ChHashTable * proptbl, FireYear * fy, List ** rwxylist)
 Returns a list of ignition locations in real world coordinates. More...

int GetIgnitionLocRANDSFromProps (ChHashTable * proptbl, FireYear * fy, List ** rwxylist)
 Returns a list of ignition locations in real world coordinates. More...


Detailed Description

Author(s):
Marco Morais
Date:
2000-2001

HFire (Highly Optmized Tolerance Fire Spread Model) Library Copyright (C) 2001 Marco Morais

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file Ignition.c.


Function Documentation

int GetIgnitionLocFIXEDFromProps ( ChHashTable * proptbl,
FireYear * fy,
List ** rwxylist )
 

Returns a list of ignition locations in real world coordinates.

For FIXED implementations this method retrieves contents of keyword IGNITION_FIXED_IGS_FILE file into temporary two dimensional array. The array is used to construct a list of real world x,y coordinate pairs. The list is returned. Bounds checking on the xy coordinates supplied by the user is not performed by this function.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   HashTable of simulation properties
fy   FireYear of all currently burning cells in simulation domain
rwxylist   List of real world x and y coordinate locations returned by function
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 117 of file Ignition.c.

int GetIgnitionLocRANDSFromProps ( ChHashTable * proptbl,
FireYear * fy,
List ** rwxylist )
 

Returns a list of ignition locations in real world coordinates.

Two tests must be completed successfully for the RANDS function to return without error. FIRST: The function GetIgnitionLocRANDUFromProps is called to retrieve a random uniformly distributed real world x,y coordinate pair inside of a cell with burnable fuel. SECOND: A temporary grid of cell-by-cell ignition probablities, specified with IGNITION_RSP keywords, is loaded from disk. The real world x,y coordinates are used to determine what the probability of ignition is at the x,y location. A uniform random number is drawn and compared to the probability at the x,y location to determine if an ignition occurs. If successful, the function returns the real world x,y coordinate pair. If unsuccessful, the entire process is repeated until a successful trial occurs.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   HashTable of simulation properties
fy   FireYear of all currently burning cells in simulation domain
rwxylist   List of real world x and y coordinate locations returned by function
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 224 of file Ignition.c.

int GetIgnitionLocRANDUFromProps ( ChHashTable * proptbl,
FireYear * fy,
List ** rwxylist )
 

Returns a list of ignition locations in real world coordinates.

For RANDU implementations this method draws two uniform random numbers having ranges of [llx,llx + (cols * cellsize)] and [lly,lly + (rows * cellsize)]. The two numbers are converted to cell indexes and the location is tested to determine whether it falls inside a burnable fuel cell. The process is repeated until a real world coordinate location is chosen that falls inside a burnable fuel cell.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   HashTable of simulation properties
fy   FireYear of all currently burning cells in simulation domain
rwxylist   List of real world x and y coordinate locations returned by function
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 166 of file Ignition.c.

Referenced by GetIgnitionLocRANDSFromProps().

int IsIgnitionNowFIXEDFromProps ( ChHashTable * proptbl )
 

Tests whether an ignition occurs during current timestep.

For FIXED implementations this method returns 1 (true) if FIXED supplied for IGNITION_TYPE keyword AND if this the first time it has been called. Otherwise this method returns 0.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   HashTable of simulation properties
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 27 of file Ignition.c.

int IsIgnitionNowRANDFromProps ( ChHashTable * proptbl )
 

Tests whether an ignition occurs during current timestep.

For RAND implementations this method converts the value of the keyword IGNITION_FREQUENCY_PER_DAY to a probability in units per hour and uses a uniform random number generator to determine if an ignition occurs this timestep.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   HashTable of simulation properties
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 46 of file Ignition.c.


Generated at Fri Jun 22 00:46:53 2001 for HFire by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000