#include <DoubleMMRelGrowth.h>
Inheritance diagram for clDoubleMMRelGrowth:
Public Member Functions | |
clDoubleMMRelGrowth (clSimManager *p_oSimManager) | |
Constructor. | |
~clDoubleMMRelGrowth () | |
Destructor. | |
float | CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) |
Applies growth as described in the equation above. | |
void | SetNameData (char *cNameString) |
Captures the behavior name passed from the parameter file. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Does setup. | |
Protected Attributes | |
clGridBase * | mp_oResourceGrid |
Grid containing the levels of the second resource. | |
float * | mp_fResourceInfluence |
Parameter governing the influence of the second resource (C in equation above). | |
float | m_fNumberYearsPerTimestep |
Number of years per timestep - from sim manager. | |
short int | m_iResourceCode |
The float data member code for the resource grid. |
This is a growth shell object which applies a double Michaelis-Menton function to find relative growth as a function of light and some other resource.
The growth equation is:
To compound the growth over the number of years per timestep, the following equation is used:
The identity of the second resource (R) in the Michaelis-Menton function is unimportant. It is assumed that the parameters will be scaled appropriately for the data range for whatever resource it is. The resource levels are obtained from a grid object called "Resource", with a single float data member called "Resource" which contains the level of the resource in question. If the grid is not present, this is considered a fatal error by this behavior.
To call this from the parameter file, use either "Double resource relative diam with auto height" (for diam with auto height growth) or "Double resource relative diam only" (for diam only growth).
The namestring for this class is "doublemmrelgrowthshell".
Copyright 2003 Charles D. Canham.
clDoubleMMRelGrowth::clDoubleMMRelGrowth | ( | clSimManager * | p_oSimManager | ) |
Constructor.
Sets the namestring.
p_oSimManager | Sim Manager object. |
clDoubleMMRelGrowth::~clDoubleMMRelGrowth | ( | ) |
Destructor.
Frees memory.
float clDoubleMMRelGrowth::CalcDiameterGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fHeightGrowth | |||
) | [virtual] |
Applies growth as described in the equation above.
p_oTree | Tree for which to calculate growth. | |
p_oPop | Tree population. | |
fHeightGrowth | Amount of height growth, in m (ignored). |
Reimplemented from clGrowthBase.
void clDoubleMMRelGrowth::SetNameData | ( | char * | cNameString | ) | [virtual] |
Captures the behavior name passed from the parameter file.
This is useful since this class can produce a few different kinds of behaviors.
cNameString | Behavior name from parameter file. |
Reimplemented from clBehaviorBase.
void clDoubleMMRelGrowth::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does setup.
Reads in values from the parameter file, and validates that all species/type combos use light (each must have "lgm" registered).
p_oDoc | DOM tree of parsed input file. |
modelErr | if any species/type combo to which this behavior is applied does not have a light behavior, or if there is no grid called "Resource". |
Reimplemented from clGrowthBase.
clGridBase* clDoubleMMRelGrowth::mp_oResourceGrid [protected] |
Grid containing the levels of the second resource.
This is not created by this behavior; it is expected to already be available. It should be named "Resource" and have one float data member called "Resource".
float* clDoubleMMRelGrowth::mp_fResourceInfluence [protected] |
Parameter governing the influence of the second resource (C in equation above).
Array size is number of behavior species.
short int clDoubleMMRelGrowth::m_iResourceCode [protected] |
The float data member code for the resource grid.