clTestLightDepSeedSurvival Class Reference

Tests the clLightDepSeedSurvival class. More...

#include <TestLightDepSeedSurvival.h>

List of all members.

Public Member Functions

void TestLightDepSeedSurvival ()
 Tests the clLightDepSeedSurvival class.

Protected Member Functions

void TestNormalGLIProcessing (clSimManager *p_oSimManager)
 This tests normal processing when the clLightDepSeedSurvival class calculates GLI.
void TestNormalStormLightProcessing (clSimManager *p_oSimManager)
 This tests normal processing when the clLightDepSeedSurvival class gets GLI from Storm Light.
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing.
void DoNormalGLIRun1 (clSimManager *p_oSimManager)
 This tests normal processing when the clLightDepSeedSurvival class calculates GLI.
void DoNormalGLIRun2 (clSimManager *p_oSimManager)
 This tests normal processing when the clLightDepSeedSurvival class calculates GLI.
char * WriteXMLFile1 ()
 Writes the setup file for DoNormalGLIRun1().
char * WriteXMLFile2 ()
 Writes the setup file for DoNormalGLIRun2().
char * WriteXMLFile3 ()
 Writes the setup file for DoNormalStormLightProcessing().
char * WriteXMLErrorFile1 ()
 Writes a file where a light extinction coefficient is not between 0 and 1.
char * WriteXMLErrorFile2 ()
 Writes a file where the value for m_fLightHeight is not zero or greater.
char * WriteXMLErrorFile3 ()
 Writes a file where the value for mp_fOptimumGLI is not between 0 and 100.
char * WriteXMLErrorFile4 ()
 Writes a file where there is no disperse behavior.
char * WriteXMLErrorFile5 ()
 Writes a file where the number of altitude angles is less than 1.
char * WriteXMLErrorFile6 ()
 Writes a file where the number of azimuth angles is less than 1.
char * WriteXMLErrorFile7 ()
 Writes a file that has Storm Light Dependent Seed Survival but does not have storm light.
void WriteCommonStuff (std::fstream &oOut)
 Writes common portions of the test parameter files (tree pop, plot, etc).


Detailed Description

Tests the clLightDepSeedSurvival class.

Member Function Documentation

void clTestLightDepSeedSurvival::TestLightDepSeedSurvival (  ) 

Tests the clLightDepSeedSurvival class.

void clTestLightDepSeedSurvival::TestNormalGLIProcessing ( clSimManager *  p_oSimManager  )  [protected]

This tests normal processing when the clLightDepSeedSurvival class calculates GLI.

This performs DoNormalGLIRun1() and DoNormalGLIRun2().

Parameters:
p_oSimManager Sim Manager object.

void clTestLightDepSeedSurvival::TestNormalStormLightProcessing ( clSimManager *  p_oSimManager  )  [protected]

This tests normal processing when the clLightDepSeedSurvival class gets GLI from Storm Light.

Parameters:
p_oSimManager Sim Manager object.

void clTestLightDepSeedSurvival::TestErrorProcessing ( clSimManager *  p_oSimManager  )  [protected]

Tests error processing.

It checks for the following errors:

  • Any of the light extinction coefficient values are not between 0 and 1.
  • The value for m_fLightHeight is not zero or greater
  • The value for mp_fOptimumGLI is not between 0 and 100.
  • There is no disperse behavior enabled.
  • The behavior is supposed to get GLI from Storm Light but Storm Light isn't present.

void clTestLightDepSeedSurvival::DoNormalGLIRun1 ( clSimManager *  p_oSimManager  )  [protected]

This tests normal processing when the clLightDepSeedSurvival class calculates GLI.

This run has storm damage and no snags.

A plot is set up and a set of trees added designed to give target GLI values to certain "Dispersed Seed" grid cells. Mostly there is only one neighbor, and the trees are placed such that the GLI point is completely within their canopies, to make test calculations easy. (GLI calculations themselves don't need testing here.) A given number of seeds of species 2, 3, and 4 is added to each of 9 grid cells. The run goes, and then we check that the appropriate number of seedlings of each species in each cell exists. WriteXMLFile1() writes the parameter file.

Parameters:
p_oSimManager Sim Manager object.

void clTestLightDepSeedSurvival::DoNormalGLIRun2 ( clSimManager *  p_oSimManager  )  [protected]

This tests normal processing when the clLightDepSeedSurvival class calculates GLI.

This run has no storm damage but has snags.

A plot is set up and a set of trees added designed to give target GLI values to certain "Dispersed Seed" grid cells. Mostly there is only one neighbor, and the trees are placed such that the GLI point is completely within their canopies, to make test calculations easy. (GLI calculations themselves don't need testing here.) A given number of seeds of species 2, 3, and 4 is added to each of 9 grid cells. The run goes, and then we check that the appropriate number of seedlings of each species in each cell exists. WriteXMLFile2() writes the parameter file.

Parameters:
p_oSimManager Sim Manager object.

char* clTestLightDepSeedSurvival::WriteXMLFile1 (  )  [protected]

Writes the setup file for DoNormalGLIRun1().

This contains 5 species, one unused (species 1; this helps catch array-index problems). Non-spatial disperse is applied to adults of all species, with values such that no seeds will be dispersed from any trees. Species 2-4 get light-dependent seed survival. Species 2-4 get storm damage.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLFile2 (  )  [protected]

Writes the setup file for DoNormalGLIRun2().

This contains 5 species, one unused (species 1; this helps catch array-index problems). Non-spatial disperse is applied to adults of all species, with values such that no seeds will be dispersed from any trees. Species 2-4 get light-dependent seed survival. Species 2-4 get Weibull snag mortality.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLFile3 (  )  [protected]

Writes the setup file for DoNormalStormLightProcessing().

This contains 5 species, one unused (species 1; this helps catch array-index problems). Non-spatial disperse is applied to adults of all species, with values such that no seeds will be dispersed from any trees. Species 2-4 get storm-light-dependent seed survival.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile1 (  )  [protected]

Writes a file where a light extinction coefficient is not between 0 and 1.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile2 (  )  [protected]

Writes a file where the value for m_fLightHeight is not zero or greater.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile3 (  )  [protected]

Writes a file where the value for mp_fOptimumGLI is not between 0 and 100.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile4 (  )  [protected]

Writes a file where there is no disperse behavior.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile5 (  )  [protected]

Writes a file where the number of altitude angles is less than 1.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile6 (  )  [protected]

Writes a file where the number of azimuth angles is less than 1.

Returns:
Filename written.

char* clTestLightDepSeedSurvival::WriteXMLErrorFile7 (  )  [protected]

Writes a file that has Storm Light Dependent Seed Survival but does not have storm light.

Returns:
Filename written.

void clTestLightDepSeedSurvival::WriteCommonStuff ( std::fstream &  oOut  )  [protected]

Writes common portions of the test parameter files (tree pop, plot, etc).

Ends with </trees&gt.

Parameters:
oOut File stream to write to.


The documentation for this class was generated from the following file:

Generated on Tue Apr 19 14:06:00 2011 for SORTIE C++ Test Documentation by  doxygen 1.5.6