Main Page   Compound List   File List   Compound Members   File Members  

PhysFuelModel.c File Reference

#include "PhysFuelModel.h"

Go to the source code of this file.

Functions

PhysFuelModelInitPhysFuelModelEmpty ()
 Initializes an empty PhysFuelModel. More...

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

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

int PhysFuelModelMetricToEnglish (PhysFuelModel * pfm)
 Converts units of attributes in existing PhysFuelModel structure. More...

int PhysFuelModelEnglishToMetric (PhysFuelModel * pfm)
 Converts units of attributes in existing PhysFuelModel structure. More...

void PhysFuelModelDumpToStream (PhysFuelModel * pfm, FILE * fstream)
 Dumps contents of PhysFuelModel to stream. More...

void FreePhysFuelModel (void * vptr)
 Frees memory associated with PhysFuelModel 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 PhysFuelModel.c.


Function Documentation

void FreePhysFuelModel ( void * vptr )
 

Frees memory associated with PhysFuelModel structure.

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

See also:
PhysFuelModel
Parameters:
vptr   ptr to PhysFuelModel

Definition at line 446 of file PhysFuelModel.c.

Referenced by FreeFuelModel(), and InitPhysFuelModelFMDFile().

PhysFuelModel * InitPhysFuelModelEmpty ( )
 

Initializes an empty PhysFuelModel.

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

Definition at line 27 of file PhysFuelModel.c.

Referenced by InitPhysFuelModelFMDFile(), and InitPhysFuelModelUnBurnable().

PhysFuelModel * InitPhysFuelModelFMDFile ( FILE * fstream,
int model_num )
 

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

Inserts the values of model_num in PhysFuelModel.

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

Definition at line 52 of file PhysFuelModel.c.

PhysFuelModel * InitPhysFuelModelUnBurnable ( )
 

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

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

Definition at line 164 of file PhysFuelModel.c.

void PhysFuelModelDumpToStream ( PhysFuelModel * pfm,
FILE * fstream )
 

Dumps contents of PhysFuelModel to stream.

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

Definition at line 386 of file PhysFuelModel.c.

Referenced by FuelModelDumpToStream().

int PhysFuelModelEnglishToMetric ( PhysFuelModel * pfm )
 

Converts units of attributes in existing PhysFuelModel 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:
PhysFuelModel
Parameters:
pfm   Ptr to existing PhysFuelModel 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 336 of file PhysFuelModel.c.

int PhysFuelModelMetricToEnglish ( PhysFuelModel * pfm )
 

Converts units of attributes in existing PhysFuelModel structure.

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

See also:
PhysFuelModel
Parameters:
pfm   Ptr to existing PhysFuelModel 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 286 of file PhysFuelModel.c.

int PhysFuelModelSetDerivedProperties ( PhysFuelModel * pfm )
 

Definition at line 191 of file PhysFuelModel.c.


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