#include <AllometricGrowthIncrementer.h>
Public Member Functions | |
clAllometricGrowthIncrementer (clSimManager *p_oSimManager) | |
Constructor. | |
float | CalcHeightGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fDiameterGrowth) |
Calculates the amount of height growth increase for a particular tree. | |
float | CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) |
Calculates the amount of diameter growth increase for a particular tree. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Does the setup for this behavior. | |
void | SetNameData (char *cNameString) |
Captures the namestring passed to this behavior. | |
Protected Attributes | |
clAllometry * | mp_oAllom |
Pointer to the allometry object. |
This is designed to be a secondary growth method for height or diameter when the growth method for the other dimension is the primary one.
If this is acting as a height increment, the increment is calculated as:
If this is acting as a diameter increment, the increment is calculated as:
When calculating an increment, the same allometric equation is used for both portions, even if the tree would be making a type transition. For example, if the tree is a seedling and the amount of diameter growth is enough to make it into a sapling, the seedling diam10-height relationship is still used for both values.
The parameter file call string for this behavior is either "height incrementer" or "diameter incrementer". The namestring is "allometric incrementer growthshell".
Copyright 2003 Charles D. Canham.
clAllometricGrowthIncrementer::clAllometricGrowthIncrementer | ( | clSimManager * | p_oSimManager | ) |
Constructor.
Sets the namestring.
float clAllometricGrowthIncrementer::CalcHeightGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fDiameterGrowth | |||
) | [virtual] |
Calculates the amount of height growth increase for a particular tree.
The height increment is calculated as the normal allometric height of the DBH before diameter growth is applied minus the normal allometric height of the DBH after diameter growth is applied.
If the tree is a seedling, the diam10 before and after the growth increment is used in the seedling diam10-height allometric equation. If the tree is a sapling, the diam10 before and after the growth increment is converted to a DBH value and that value is used in the sapling DBH-height allometric equation. If the tree is an adult, then DBH before and after the growth increment is used in the adult DBH-height allometric equation.
This doesn't need to compound height by timestep length, since diameter should already take that into account.
p_oTree | Tree for which to calculate growth. | |
p_oPop | Tree population object, just in case it's needed. | |
fDiameterGrowth | Amount of diameter growth for this tree, in cm. |
Reimplemented from clGrowthBase.
float clAllometricGrowthIncrementer::CalcDiameterGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fHeightGrowth | |||
) | [virtual] |
Calculates the amount of diameter growth increase for a particular tree.
The diameter increment is calculated as the diameter derived from height before height growth is applied minus the diameter derived from height after height growth is applied.
p_oTree | Tree for which to calculate growth. | |
p_oPop | Tree population object, just in case it's needed. | |
fHeightGrowth | Amount of height growth, in m (ignored). |
Reimplemented from clGrowthBase.
void clAllometricGrowthIncrementer::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does the setup for this behavior.
This queries the tree population for a pointer to the allometry object.
Reimplemented from clGrowthBase.
void clAllometricGrowthIncrementer::SetNameData | ( | char * | cNameString | ) | [virtual] |
Captures the namestring passed to this behavior.
This is overridden from clBehaviorBase so we can capture the namestring passed. Since this class can create multiple kinds of behaviors that function differently, this will capture what kind of behavior this is supposed to be.
cNameString | Behavior's namestring. |
Reimplemented from clBehaviorBase.
clAllometry* clAllometricGrowthIncrementer::mp_oAllom [protected] |
Pointer to the allometry object.