Main Page   Compound List   File List   Compound Members   File Members  

RothFuelModel.c File Reference

#include "RothFuelModel.h"

Go to the source code of this file.

Functions

RothFuelModelInitRothFuelModelEmpty ()
 Initializes an empty RothFuelModel. More...

RothFuelModelInitRothFuelModelFMDFile (FILE * fstream, int model_num)
 Opens and reads a .fmd file containing fuel models and associated values. More...

RothFuelModelInitRothFuelModelUnBurnable ()
 Creates a fuel model with attributes that correspond to unburnable fuel. More...

int RothFuelModelMetricToEnglish (RothFuelModel * rfm)
 Takes a Ptr to existing RothFuelModel structure. More...

int RothFuelModelEnglishToMetric (RothFuelModel * rfm)
 Takes a Ptr to existing RothFuelModel structure. More...

void RothFuelModelDumpToStream (RothFuelModel * rfm, FILE * fstream)
 Dumps contents of RothFuelModel to stream. More...

void FreeRothFuelModel (void * vptr)
 Frees memory associated with RothFuelModel structure. 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 RothFuelModel.c.


Function Documentation

void FreeRothFuelModel ( void * vptr )
 

Frees memory associated with RothFuelModel structure.

Subsequent calls to methods taking RothFuelModel as argument will not work.

See also:
RothFuelModel
Parameters:
vptr   ptr to RothFuelModel

Definition at line 492 of file RothFuelModel.c.

Referenced by FreeFuelModel(), and InitRothFuelModelFMDFile().

RothFuelModel * InitRothFuelModelEmpty ( )
 

Initializes an empty RothFuelModel.

See also:
RothFuelModel
Return values:
RothFuelModel   * Ptr to RothFuelModel with empty attributes.

Definition at line 26 of file RothFuelModel.c.

Referenced by InitRothFuelModelFMDFile(), and InitRothFuelModelUnBurnable().

RothFuelModel * InitRothFuelModelFMDFile ( FILE * fstream,
int model_num )
 

Opens and reads a .fmd file containing fuel models and associated values.

Inserts the values of model_num in RothFuelModel.

See also:
RothFuelModel
Parameters:
fstream   pointer to .fmd file
model_num   fuel model number to search inside of .fmd file for and retrieve values
Return values:
RothFuelModel   * Ptr to RothFuelModel with attributes from .fmd file

Definition at line 55 of file RothFuelModel.c.

RothFuelModel * InitRothFuelModelUnBurnable ( )
 

Creates a fuel model with attributes that correspond to unburnable fuel.

See also:
RothFuelModel
Return values:
RothFuelModel   * Ptr to RothFuelModel with attributes of an unburnable fuel.

Definition at line 193 of file RothFuelModel.c.

void RothFuelModelDumpToStream ( RothFuelModel * rfm,
FILE * fstream )
 

Dumps contents of RothFuelModel to stream.

See also:
RothFuelModel
Parameters:
rfv   ptr to RothFuelModel
fstream   an open stream to dump to, can be stdout, stderr, or open FILE stream

Definition at line 421 of file RothFuelModel.c.

Referenced by FuelModelDumpToStream().

int RothFuelModelEnglishToMetric ( RothFuelModel * rfm )
 

Takes a Ptr to existing RothFuelModel structure.

Tests if data in structure is METRIC or ENGLISH units. If METRIC, then does nothing. If ENGLISH, then converts values to METRIC.

See also:
RothFuelModel
Parameters:
rfm   Ptr to existing RothFuelModel 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 368 of file RothFuelModel.c.

int RothFuelModelMetricToEnglish ( RothFuelModel * rfm )
 

Takes a Ptr to existing RothFuelModel structure.

Tests if data in structure is METRIC or ENGLISH units. If METRIC, then converts data to ENGLISH. If ENGLISH, then does nothing.

Parameters:
rfm   Ptr to existing RothFuelModel 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 315 of file RothFuelModel.c.

Referenced by Roth1972FireSpreadSetFuelBed().

int RothFuelModelSetDerivedProperties ( RothFuelModel * rfm )
 

Definition at line 220 of file RothFuelModel.c.


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