clGridBasedSpatialDisperse Class Reference

Anisotropic spatial dispersal - Version 1.0. More...

#include <GridBasedSpatialDisperse.h>

Inheritance diagram for clGridBasedSpatialDisperse:

clDisperseBase clBehaviorBase clWorkerBase clAnisotropicDisperse clIsotropicDisperse List of all members.

Public Member Functions

 clGridBasedSpatialDisperse (clSimManager *p_oSimManager)
 Constructor.
 ~clGridBasedSpatialDisperse ()
 Destructor.

Protected Member Functions

void AddSeeds ()
 Performs dispersal.
virtual void DoChildSetup (xercesc::DOMDocument *p_oDoc)
 Child classes can override this to do extra setup.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Reads in values from the parameter file.
virtual float GetFunctionValue (float &fCellX, float &fCellY, float &fTreeX, float &fTreeY, int &iSpecies)=0
 Gets normalized function value which, when multiplied by fecundity, gets the number of seeds for a tree.
void DeclareArrays ()
 Declares the arrays.
void GetParameterFileData (xercesc::DOMDocument *p_oDoc)
 Extracts needed parameter file data.
void CalculateFecundity ()
 Calculates fecundity.
void PopulateUsedTable ()
 Declares and populates the mp_bIsUsed array.
void CalculateQueryHeight ()
 Calculates the shortest possible reproducing neighbor, by finding the shortest height at a species' min.

Protected Attributes

clPlotmp_oPlot
 Plot object.
float * mp_fDispersalX0
 Dispersal (weibull) or X0 (lognormal) parameter for each species.
float * mp_fThetaXb
 Theta (weibull) or Xb (lognormal) parameter for each species.
float * mp_fStr
 Seedling Total Recruits for each species.
float * mp_fBeta
 Beta parameter for each species.
float * mp_fFecundity
 Fecundity for 30 cm dbh tree for each species.
float m_fMaxSearchRadius
 Max distance in m to search for dispersing parents from the center of a grid cell.
float m_fQueryHeight
 Shortest possible reproducing neighbor height, for putting in distance/height queries.
float m_fSeedCellArea
 Area of seed grid cell in square meters.
float m_fNumYearsPerTimestep
 Number of years per timestep.
short int * mp_iIndexes
 This will speed access to the other arrays by storing each species' array index so the other arrays only have to be as big as the number of unique species for this behavior.
short int m_iNumFunctions
 How many functions there are - 2.
short int * mp_iWhatFunction
 Which function is used for each species.
bool ** mp_bIsUsed
 Whether this behavior is used by a species/type combo.

Detailed Description

Anisotropic spatial dispersal - Version 1.0.

This is a base class for behaviors that create and disperse seeds according to the spatially-explicit model. For each grid cell, the number of seeds is calculated based on the size and distance of parents of that species.

This class and its descendents do not take gap status into account. Behaviors of this class cannot be applied to stumps.

The "seeds" are actually tallies by species in a grid. This behavior does not produce any seedlings. A separate recruitment behavior must "germinate" the seeds into seedlings according to its own rules.

Copyright 2003 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 28, 2004 - Submitted as beta (LEM)


Constructor & Destructor Documentation

clGridBasedSpatialDisperse::clGridBasedSpatialDisperse ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.


Member Function Documentation

void clGridBasedSpatialDisperse::AddSeeds (  )  [protected, virtual]

Performs dispersal.

For each grid cell, the center point of the cell is calculated. For each species to which this behavior applies, a search is done to find all trees within the maximum search radius. For each tree, the number of seeds to add is gotten by multiplying the fecundity by the return value of the virtual function GetFunctionValue(). The total number of seeds for a species is RandomRound()ed to arrive at an integer.

Implements clDisperseBase.

virtual void clGridBasedSpatialDisperse::DoChildSetup ( xercesc::DOMDocument *  p_oDoc  )  [inline, protected, virtual]

Child classes can override this to do extra setup.

Parameters:
p_oDoc Pointer to parsed parameter file.

Reimplemented in clAnisotropicDisperse, and clIsotropicDisperse.

void clGridBasedSpatialDisperse::DoShellSetup ( xercesc::DOMDocument *  p_oDoc  )  [protected, virtual]

Reads in values from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.

Implements clDisperseBase.

virtual float clGridBasedSpatialDisperse::GetFunctionValue ( float &  fCellX,
float &  fCellY,
float &  fTreeX,
float &  fTreeY,
int &  iSpecies 
) [protected, pure virtual]

Gets normalized function value which, when multiplied by fecundity, gets the number of seeds for a tree.

Must be overridden by child classes.

Parameters:
fCellX X coordinate of point at center of grid cell into which seeds are being dispersed.
fCellY Y coordinate of point at center of grid cell into which seeds are being dispersed.
fTreeX X coordinate of neighbor parent tree.
fTreeY Y coordinate of neighbor parent tree.
iSpecies Species of neighbor parent tree.
Returns:
Function value.

Implemented in clAnisotropicDisperse, and clIsotropicDisperse.

void clGridBasedSpatialDisperse::GetParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts needed parameter file data.

This function takes into account whether this is isotropic or anisotropic.

Parameters:
p_oDoc Parsed parameter file document.
Exceptions:
modelErr if the function values are not valid, or if the max search radius is negative or greater than half the shortest plot length.

void clGridBasedSpatialDisperse::CalculateFecundity (  )  [protected]

Calculates fecundity.

Fecundity is calculated as

fec = STR/30beta

void clGridBasedSpatialDisperse::PopulateUsedTable (  )  [protected]

Declares and populates the mp_bIsUsed array.

Exceptions:
modelErr if the object is being applied to a type other than sapling and adult.

void clGridBasedSpatialDisperse::CalculateQueryHeight (  )  [protected]

Calculates the shortest possible reproducing neighbor, by finding the shortest height at a species' min.

reproductive DBH.


Member Data Documentation

clPlot* clGridBasedSpatialDisperse::mp_oPlot [protected]

Plot object.

float* clGridBasedSpatialDisperse::mp_fDispersalX0 [protected]

Dispersal (weibull) or X0 (lognormal) parameter for each species.

This value comes from the parameter file.

float* clGridBasedSpatialDisperse::mp_fThetaXb [protected]

Theta (weibull) or Xb (lognormal) parameter for each species.

This value comes from the parameter file.

float* clGridBasedSpatialDisperse::mp_fStr [protected]

Seedling Total Recruits for each species.

This value comes from the parameter file.

float* clGridBasedSpatialDisperse::mp_fBeta [protected]

Beta parameter for each species.

This value comes from the parameter file.

float* clGridBasedSpatialDisperse::mp_fFecundity [protected]

Fecundity for 30 cm dbh tree for each species.

This value is calculated in CalculateFecundity().

float clGridBasedSpatialDisperse::m_fMaxSearchRadius [protected]

Max distance in m to search for dispersing parents from the center of a grid cell.

This must be less than half the shortest plot distance.

short int* clGridBasedSpatialDisperse::mp_iIndexes [protected]

This will speed access to the other arrays by storing each species' array index so the other arrays only have to be as big as the number of unique species for this behavior.

bool** clGridBasedSpatialDisperse::mp_bIsUsed [protected]

Whether this behavior is used by a species/type combo.

First array index is species, second is type. This helps quickly sort through the results of neighbor searches.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:30:43 2007 for SORTIE Core C++ Documentation by  doxygen 1.5.2