clTestMastingSpatialDisperse Class Reference

This class tests the masting spatial dispersal behavior (clMastingSpatialDisperse). More...

#include <TestMastingSpatialDisperse.h>

List of all members.

Public Member Functions

void TestMastingSpatialDisperse ()
 Groups all tests into one.

Private Member Functions

void NormalProcessingRun1 (clSimManager *p_oSimManager)
 Tests first normal processing run.
void NormalProcessingRun2 (clSimManager *p_oSimManager)
 Tests second normal processing run.
void NormalProcessingRun3 (clSimManager *p_oSimManager)
 Tests third normal processing run.
void NormalProcessingRun4 (clSimManager *p_oSimManager)
 Tests fourth normal processing run.
void NormalProcessingRun5 (clSimManager *p_oSimManager)
 Tests fifth normal processing run.
void CheckMastingSetup (clSimManager *p_oSimManager)
 Tests masting CDF setup.
void TestErrorProcessing (clSimManager *p_oSimManager)
 Makes sure errors are correctly caught on setup.
char * WriteXMLFile1 ()
 Writes a parameter file for normal processing run 1.
char * WriteXMLFile2 ()
 Writes a parameter file for normal processing run 2.
char * WriteXMLFile3 ()
 Writes a parameter file for normal processing run 3.
char * WriteXMLFile4 ()
 Writes a parameter file for normal processing run 4.
char * WriteXMLFile5 (int iRandomSeed)
 Writes a parameter file for normal processing run 5.
char * WriteXMLCheckFile1 ()
 Writes a file to test masting CDF setup.
char * WriteXMLCheckFile2 ()
 Writes a file to test masting CDF setup.
char * WriteXMLErrorFile1 ()
 Writes a file where the masting "a" parameter is zero.
char * WriteXMLErrorFile2 ()
 Writes a file where the masting fraction participating is not between 0 and 1.
char * WriteXMLErrorFile3 ()
 Writes a file where the non-masting fraction participating is not between 0 and 1.
char * WriteXMLErrorFile4 ()
 Writes a file where the masting beta is greater than 25.
char * WriteXMLErrorFile5 ()
 Writes a file where the non-masting beta is greater than 25.
char * WriteXMLErrorFile6 ()
 Writes a file where the masting theta is greater than 50.
char * WriteXMLErrorFile7 ()
 Writes a file where the non-masting theta is greater than 50.
void WriteTrees (std::fstream &oOut)
 Writes tree stuff.
void WriteAllometry (std::fstream &oOut)
 Writes allometry stuff.


Detailed Description

This class tests the masting spatial dispersal behavior (clMastingSpatialDisperse).

Member Function Documentation

void clTestMastingSpatialDisperse::TestMastingSpatialDisperse (  ) 

Groups all tests into one.

void clTestMastingSpatialDisperse::NormalProcessingRun1 ( clSimManager *  p_oSimManager  )  [private]

Tests first normal processing run.

WriteXMLFile1() does setup. Three trees are created for the plot. The file is run for one timestep and the seedlings are counted. A certain number of each species is expected. This tests masting and mast grouping.

Parameters:
p_oSimManager Sim manager object.

void clTestMastingSpatialDisperse::NormalProcessingRun2 ( clSimManager *  p_oSimManager  )  [private]

Tests second normal processing run.

WriteXMLFile2() does setup. This is the same as run 1 except it's three years per timestep.

Parameters:
p_oSimManager Sim manager object.

void clTestMastingSpatialDisperse::NormalProcessingRun3 ( clSimManager *  p_oSimManager  )  [private]

Tests third normal processing run.

WriteXMLFile3() does setup. This tests fraction participating. It is just like run 1 except 100 trees are created for each species and the final seedling counts should reflect the number of parents that participated.

Parameters:
p_oSimManager Sim manager object.

void clTestMastingSpatialDisperse::NormalProcessingRun4 ( clSimManager *  p_oSimManager  )  [private]

Tests fourth normal processing run.

WriteXMLFile4() does setup. This tests STR draws per species vs. draws per tree. Four trees are used, 2 of each of 2 species. Species 1 is a draw per species, Species 2 is draw per tree. The two trees of species 1 should produce the same number of seedlings, and the two trees of species 2 should produce different seedlings.

Parameters:
p_oSimManager Sim manager object.

void clTestMastingSpatialDisperse::NormalProcessingRun5 ( clSimManager *  p_oSimManager  )  [private]

Tests fifth normal processing run.

WriteXMLFile5() does setup. This tests normal draws. 100 runs are done, and the mean and std deviation of the number of seedlings is calculated to see if it matches the requested.

Parameters:
p_oSimManager Sim manager object.

void clTestMastingSpatialDisperse::CheckMastingSetup ( clSimManager *  p_oSimManager  )  [private]

Tests masting CDF setup.

This uses WriteXMLCheckFile1() and WriteXMLCheckFile2() for setup. The first gives a CDF where the max time until mast is before the end of the run. The second gives a CDF where the max time until mast is the length of the run.

void clTestMastingSpatialDisperse::TestErrorProcessing ( clSimManager *  p_oSimManager  )  [private]

Makes sure errors are correctly caught on setup.

All the error parameter files are fed in to make sure the errors are trapped.

Parameters:
p_oSimManager Sim manager object.

char* clTestMastingSpatialDisperse::WriteXMLFile1 (  )  [private]

Writes a parameter file for normal processing run 1.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLFile2 (  )  [private]

Writes a parameter file for normal processing run 2.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLFile3 (  )  [private]

Writes a parameter file for normal processing run 3.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLFile4 (  )  [private]

Writes a parameter file for normal processing run 4.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLFile5 ( int  iRandomSeed  )  [private]

Writes a parameter file for normal processing run 5.

Parameters:
iRandomSeed Random seed.
Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLCheckFile1 (  )  [private]

Writes a file to test masting CDF setup.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLCheckFile2 (  )  [private]

Writes a file to test masting CDF setup.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile1 (  )  [private]

Writes a file where the masting "a" parameter is zero.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile2 (  )  [private]

Writes a file where the masting fraction participating is not between 0 and 1.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile3 (  )  [private]

Writes a file where the non-masting fraction participating is not between 0 and 1.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile4 (  )  [private]

Writes a file where the masting beta is greater than 25.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile5 (  )  [private]

Writes a file where the non-masting beta is greater than 25.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile6 (  )  [private]

Writes a file where the masting theta is greater than 50.

Returns:
Filename written.

char* clTestMastingSpatialDisperse::WriteXMLErrorFile7 (  )  [private]

Writes a file where the non-masting theta is greater than 50.

Returns:
Filename written.

void clTestMastingSpatialDisperse::WriteTrees ( std::fstream &  oOut  )  [private]

Writes tree stuff.

Parameters:
oOut File stream to write to.

void clTestMastingSpatialDisperse::WriteAllometry ( std::fstream &  oOut  )  [private]

Writes allometry stuff.

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