Main Page   Compound List   File List   Compound Members   File Members  

FireConfig.c File Reference

#include "FireConfig.h"

Go to the source code of this file.

Functions

int InitPropsFromFireConfig (ChHashTable ** proptbl, char * cfg_fname)
 Reads simulation configuration information from file and stores in ChHashTable. More...

int InitGridsFromPropsFireConfig (ChHashTable * proptbl, GridData ** elev, GridData ** slope, GridData ** aspect)
 Loads terrain-related raster data required for fire prediction. More...

int InitFireTimerFromPropsFireConfig (ChHashTable * proptbl, FireTimer ** ft)
 Initializes FireTimer structure used by simulation. More...

int InitFuelModelHashTableFromFuelModelListFireConfig (List * fmlist, ChHashTable ** fmtble)
 Initializes ChHashTable of FuelModels indexed by model number, using the supplied List. More...

int InitStandAgeFromPropsFireConfig (ChHashTable * proptbl, GridData * elev, GridData ** std_age)
 Loads stand age data for generating age-dependent fuels. More...

int InitFireEnvFromPropsFireConfig (ChHashTable * proptbl, FireEnv ** fe)
 Assigns appropriate function pointers to FireEnv structure based upon user configuration. More...

int InitRandNumGenFromPropsFireConfig (ChHashTable * proptbl, void(*RandInit)(long int seed))
 Initializes simulation random number generator with user supplied seed or from seed table. More...

void FireConfigDumpPropsToStream (ChHashTable * proptbl, FILE * fstream)
 Dumps ChHashTable of current simulation configuration properties to stream. More...

void FireConfigDumpFuelModelListToStream (List * fmlist, FILE * fstream)
 Dumps List of current FuelModels to stream. 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 FireConfig.c.


Function Documentation

void FireConfigDumpFuelModelListToStream ( List * pnvlist,
FILE * fstream )
 

Dumps List of current FuelModels to stream.

See also:
List , FuelModel , Check the config file documentation
Parameters:
pnvlist   FuelModels used by current simulation
fstream   stream to write to
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 431 of file FireConfig.c.

void FireConfigDumpPropsToStream ( ChHashTable * proptbl,
FILE * fstream )
 

Dumps ChHashTable of current simulation configuration properties to stream.

See also:
ChHashTable , EnumFireProp , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
fstream   stream to write properties to
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 410 of file FireConfig.c.

int InitFireEnvFromPropsFireConfig ( ChHashTable * proptbl,
FireEnv ** fe )
 

Assigns appropriate function pointers to FireEnv structure based upon user configuration.

See also:
ChHashTable , FireEnv , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
fe   if function returns without error, initialized FireEnv structure
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 251 of file FireConfig.c.

int InitFireTimerFromPropsFireConfig ( ChHashTable * proptbl,
FireTimer ** ft )
 

Initializes FireTimer structure used by simulation.

See also:
ChHashTable , FireTimer , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
ft   if function returns without error, initialized simulation FireTimer
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 90 of file FireConfig.c.

int InitFuelModelHashTableFromFuelModelListFireConfig ( List * fmlist,
ChHashTable ** fmtble )
 

Initializes ChHashTable of FuelModels indexed by model number, using the supplied List.

See also:
List , ChHashTable , FuelModel , Check the config file documentation
Parameters:
fmlist   List of FuelModels to insert into ChHashTable
fmtble   ChHashTable of FuelModels indexed by fuel model number
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 151 of file FireConfig.c.

int InitGridsFromPropsFireConfig ( ChHashTable * proptbl,
GridData ** elev,
GridData ** slope,
GridData ** aspect )
 

Loads terrain-related raster data required for fire prediction.

See also:
ChHashTable , GridData , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
elev   if function returns without error, initialized GridData of elevation values
slope   if function returns without error, initialized GridData of slope values
aspect   if function returns without error, initialized GridData of aspect values
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 65 of file FireConfig.c.

int InitPropsFromFireConfig ( ChHashTable ** proptbl,
char * cfg_fname )
 

Reads simulation configuration information from file and stores in ChHashTable.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
cfg_fname   filename where simulation properties stored
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 FireConfig.c.

int InitRandNumGenFromPropsFireConfig ( ChHashTable * proptbl,
void(* RandInit)(long int seed) )
 

Initializes simulation random number generator with user supplied seed or from seed table.

See also:
ChHashTable , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
RandInit   pointer to random number generating function to use during simulation
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 385 of file FireConfig.c.

int InitStandAgeFromPropsFireConfig ( ChHashTable * proptbl,
GridData * elev,
GridData ** std_age )
 

Loads stand age data for generating age-dependent fuels.

See also:
ChHashTable , GridData , Check the config file documentation
Parameters:
proptbl   ChHashTable of simulation properties
elev   GridData of terrain elevation used to define the simulation boundaries
std_age   if function returns without error, initialized GridData of current stand age for each cell
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 178 of file FireConfig.c.


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