#include <TestMastingSpatialDisperse.h>
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. |
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.
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.
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.
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.
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.
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.
p_oSimManager | Sim manager object. |
char* clTestMastingSpatialDisperse::WriteXMLFile1 | ( | ) | [private] |
Writes a parameter file for normal processing run 1.
char* clTestMastingSpatialDisperse::WriteXMLFile2 | ( | ) | [private] |
Writes a parameter file for normal processing run 2.
char* clTestMastingSpatialDisperse::WriteXMLFile3 | ( | ) | [private] |
Writes a parameter file for normal processing run 3.
char* clTestMastingSpatialDisperse::WriteXMLFile4 | ( | ) | [private] |
Writes a parameter file for normal processing run 4.
char* clTestMastingSpatialDisperse::WriteXMLFile5 | ( | int | iRandomSeed | ) | [private] |
Writes a parameter file for normal processing run 5.
iRandomSeed | Random seed. |
char* clTestMastingSpatialDisperse::WriteXMLCheckFile1 | ( | ) | [private] |
Writes a file to test masting CDF setup.
char* clTestMastingSpatialDisperse::WriteXMLCheckFile2 | ( | ) | [private] |
Writes a file to test masting CDF setup.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile1 | ( | ) | [private] |
Writes a file where the masting "a" parameter is zero.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile2 | ( | ) | [private] |
Writes a file where the masting fraction participating is not between 0 and 1.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile3 | ( | ) | [private] |
Writes a file where the non-masting fraction participating is not between 0 and 1.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile4 | ( | ) | [private] |
Writes a file where the masting beta is greater than 25.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile5 | ( | ) | [private] |
Writes a file where the non-masting beta is greater than 25.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile6 | ( | ) | [private] |
Writes a file where the masting theta is greater than 50.
char* clTestMastingSpatialDisperse::WriteXMLErrorFile7 | ( | ) | [private] |
Writes a file where the non-masting theta is greater than 50.
void clTestMastingSpatialDisperse::WriteTrees | ( | std::fstream & | oOut | ) | [private] |
Writes tree stuff.
oOut | File stream to write to. |
void clTestMastingSpatialDisperse::WriteAllometry | ( | std::fstream & | oOut | ) | [private] |
Writes allometry stuff.
oOut | File stream to write to. |